Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kalyan.cse05
Yak Posting Veteran
74 Posts |
Posted - 2011-04-21 : 02:37:23
|
| Hi,I have a query and it contais first bracket ("(") and second bracket (")"). Could you tell me how i can parse itExample :DECLARE @SQL varchar(1200)-----select query formed here-----SELECT @SQL = @SQL + ' WHERE Advisory.aBase_UOM <> Material.Base_UOM and (aStatus <> 2) and (aStatus <> 3)'Exec(@SQL)Now i get error message that "Incorrect syntax near 'a'."kalyan Ashis Dey |
|
|
kalyan.cse05
Yak Posting Veteran
74 Posts |
Posted - 2011-04-21 : 02:38:39
|
| This did not create any issue when i was uasing SQL server 2005. Now it creates an issue in SQL server 2008kalyan Ashis Dey |
 |
|
|
raghuveer125
Constraint Violating Yak Guru
285 Posts |
Posted - 2011-04-21 : 02:50:54
|
| Post some table dataRaghu' S |
 |
|
|
kalyan.cse05
Yak Posting Veteran
74 Posts |
Posted - 2011-04-21 : 02:55:04
|
| WHERE Advisory.aBase_UOM <> Material.Base_UOM and (aStatus <> 2) and (aStatus <> 3)----this is the query that creates issue..this query passed as a sting to the variable @SQL. Now I think it is not able to parse the symbol "(" as well as ")". So please let me know how we can parse these symbolskalyan Ashis Dey |
 |
|
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2011-04-21 : 02:57:21
|
quote: Originally posted by kalyan.cse05I have a query and it contais first bracket ("(") and second bracket (")"). Could you tell me how i can parse itNow i get error message that "Incorrect syntax near 'a'."
Whould you like to share this query, especially the line where this error occuring.--------------------------http://connectsql.blogspot.com/ |
 |
|
|
raghuveer125
Constraint Violating Yak Guru
285 Posts |
Posted - 2011-04-21 : 03:05:34
|
| Hey we cant read your brain what you need.Could you post your full query.If possible post some data also.Or What your @SQL contain?Raghu' S |
 |
|
|
|
|
|