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 |
|
rkhosla
Starting Member
3 Posts |
Posted - 2002-08-15 : 11:13:10
|
| Hi folks, I am coding in T-SQL (Sybase), and would like to execute a stored procedure within a Select statement in the Where clause. I've tried executing the folloing stmt..but it doesnt work: select VFD.FIELDKEY, NF.FIELDNAME,VFD.VENDORNOTICEKEY, N.NOTICEVENDOR, VFD.FIELDVALUE from VENDORNOTFIELDDET_v VFD, NOTICEFIELD_v NF , VENDORNOTICE_v VN where VFD.fieldkey = NF.fieldkey AND VN.VENDORNOTICEKEY = VFD.VENDORNOTICEKEY AND vfd.vendornoticekey in ( execute p_PARSESTRING '22,33' ) I get a syntax error in the execute code. I was wondering if you could tell me what I'm doing wrong or show me an example of how this fucntionality can be executed Cheers, Rahul |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-08-15 : 11:18:00
|
| It cannot be done that way (not in SQL Server anyway, and I doubt Sybase can either)If you need to parse comma-delimited strings there are ways to do it that don't require stored procedures:http://www.sqlteam.com/item.asp?ItemID=2652You can use that technique in Sybase without any modification. |
 |
|
|
|
|
|