Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
R

Ron Savage

@Ron Savage
About
Posts
6
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Escape Sequences....
    R Ron Savage

    Colin Angus Mackay wrote:

    There is the possibility of a Second Order Attack. This is where supposedly clensed data that is already sitting in the database can be used to form an attack. All the data used is internal to the system at the time the SQL is formed, but the threat is just as real.

    Another excellent bit of advice, yet again completely outside the context of the discussion. Neither the original question nor my response involved building a query from any external data. Without the inclusion of external text that may at some point have been entered by an end user of the program - SQL Injection attacks are not an issue.

    Ron

    Database csharp database help question oop

  • Escape Sequences....
    R Ron Savage

    Good advice, but it doesn't answer his question. *If* he is accepting user input to build the query, then SQL Injection attacks are an issue. If the entire query as written is part of his internal code, there is no danger.

    Ron

    Database csharp database help question oop

  • Why are some comments removed from stored procedures in SQL Server 2005?
    R Ron Savage

    Nevermind, I figured it out. The query tool I am using ( WinSQL - very handy tool ) has an option to "Parse Comments Locally" which was turned on - so it was removing the comments *before* sending the to SQL Server to save. :-)

    Ron

    Database database sql-server sysadmin debugging tools

  • Why are some comments removed from stored procedures in SQL Server 2005?
    R Ron Savage

    I use a lot of comments in my stored procedures to document my code for future developers that might have to modify / debug it. However, when I view my stored procedure script or pick the "modify" option in SQL Server Management Studio the code comes up with blank lines where my comments are supposed to be. I see other stored procedures that have retained thier comments (although they are much smaller in size) using the same "--" single line comment that I use. Anyone know why that is happening? Thanks,

    Ron

    Database database sql-server sysadmin debugging tools

  • sql
    R Ron Savage

    Hi Raj,

    select
    t2.col1,
    t1.col2,
    t2.col3
    from
    tab2 t2

    LEFT OUTER JOIN tab1 t1
    ON ( t1.col2 = ascii(t2.col3) - 96 )

    Results:
    col1 col2 col3


    1 1 a
    1 2 b
    1 NULL c
    1 NULL d

    Pretty silly way to join data though, I hope it was part of a "puzzle" question and not a serious solution. :-)

    Ron

    Database database help

  • Escape Sequences....
    R Ron Savage

    Hi Mohsin, I don't think SQL syntax supports escape characters like that. To use an embedded single quote in a query like your example, you put two single quotes in the string: SELECT * FROM ClauseTranslations WHERE Clause LIKE 'trainee''s cost'

    Ron

    Database csharp database help question oop
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups