Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Syntax issue
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

220 Posts

Posted - 06/22/2006 :  12:23:08  Show Profile  Reply with Quote
Hi - I have a dyn. sql statement (I need it because of sorting for datagrid in .net). I have everything working except I am stuck on:

WHERE 1=1 AND status <> 'closed'

I'm unsure how to handle the quotes around closed? I tried to double quote, but that didn't seem to work. Any ideas....anyone?

Thanks for any help you can provide

Aged Yak Warrior

582 Posts

Posted - 06/22/2006 :  12:32:52  Show Profile  Send karuna a Yahoo! Message  Reply with Quote
Try this
status <> '''closed'''

You need to escape a single qoute with another singleqoute

Go to Top of Page

Posting Yak Master

220 Posts

Posted - 06/22/2006 :  12:35:46  Show Profile  Reply with Quote
thanks for replying so quickly! That worked :)
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2019 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000