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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 String issue in sproc

Author  Topic 

julianfraser
Starting Member

19 Posts

Posted - 2005-05-09 : 14:30:50
I need to creat a dynamic SQL statement which will need embedded quotation marks...

something like...

'this is a "quote" inside my string' - as in asp

or

'this is a \'quote\' inside my string' - as in javascript



ALSO... this is giving me and error....

SELECT @sql_string = 'SELECT p.propertyID, p.title, p.price FROM property p WHERE ' + @where_clause

Server: Msg 8152, Level 16, State 9, Line 1
String or binary data would be truncated.


Thanks,
Julian.

mfemenel
Professor Frink

1421 Posts

Posted - 2005-05-09 : 15:53:53
How many characters did you allocate for your @sql_string variable. Sounds like you're trying to stuff more into it than you allocated.

Mike
"oh, that monkey is going to pay"
Go to Top of Page
   

- Advertisement -