August 9, 2012 at 11:57 pm
while i am writing query,
select * from table name where column like '%N%' escape'\' in oracle its gives the output.... but i am execute the query on sqlserver2000 'll show error message of
Incorrect syntax near the keyword 'ESCAPE'.
August 10, 2012 at 2:48 am
This one should work in SQL, you may have something else wrong in the query. Try to clear everything before and after your statement...
August 10, 2012 at 3:01 am
This was removed by the editor as SPAM
August 10, 2012 at 3:19 am
select * from table name where column like '%N%' escape'\'
I suggest removing escape '\' because the only reason you'd need it is to indicate that % should be interpreted literally (like as escape '%').
Edit: More info on this syntax can be found here: http://msdn.microsoft.com/en-us/library/ms179859.aspx
And the problem is this syntax was introduced in SQL 2005.
My thought question: Have you ever been told that your query runs too fast?
My advice:
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.
Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
Since random numbers are too important to be left to chance, let's generate some![/url]
Learn to understand recursive CTEs by example.[/url]
[url url=http://www.sqlservercentral.com/articles/St
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply