Records with a double quote in them

  • I have a bunch of records that have a " in a given column and I want to select those records out.

    Actually in the long run I am going to want to replace that " with a blank but for now I just want to get a record count.

    What is the correct syntax that a person should use for this? If you'd be willing to give the syntax for updating it as well I'd appreciate it.

    here's what I have and where I'm stuck

    select *

    from dbo.document

    where substring(var_fld_4,6,1) =

  • Don't use substring.

    Use charindex and look for a charindex() > 0

    http://msdn.microsoft.com/en-us/library/ms186323%28v=SQL.100%29.aspx

Viewing 2 posts - 1 through 1 (of 1 total)

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