where clause..Please help

  • when i issue this statement;

     select * from table_name where column = 'abc'  it works

    select * from table_name where column = "abc" it doesn't

    Is double quotes not allowed in MS SQL.

    I am trying this in Query analyser. version 8.

     

    Any input would be much appreciated.

    S Rao

     

     

  • Hi,

    If you go to Tools->Options->Connection Properties you can uncheck "Set quoted_identifier" which will allow you to use double quotes.

    Unfortunately this is really bad practice and will cause you all sorts of problems longer term - better off just getting used to only using single quotes.......

    Have fun

    Steve

    We need men who can dream of things that never were.

  • You can set it dynamically in T-SQL :

    SET QUOTED_IDENTIFIER ON/OFF

    Why do you say that it is bad practice? - or do you just mean at the connection level?

  • many thanks for your help.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply