SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

ann
Posting Yak Master

218 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

karuna
Aged Yak Warrior

581 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

Karunakaran
Go to Top of Page

ann
Posting Yak Master

218 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  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000