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 |
|
numerator
Starting Member
1 Post |
Posted - 2007-11-16 : 05:02:46
|
I want to write a sp uasing open queryand havin statment likeselect * from openquery(M1,'exec skt '''+@fromdate+''','''+@todate+'') want to execute a sp through open query but its showing error that"Server: Msg 170, Level 15, State 1, Procedure Shops, Line 23Line 23: Incorrect syntax near '+'."Can u pls tell me the solution? |
|
|
kishore_pen
Starting Member
49 Posts |
Posted - 2007-11-16 : 06:18:11
|
| use convert function at @fromdate & @todate variables. |
 |
|
|
anonymous1
Posting Yak Master
185 Posts |
Posted - 2007-11-16 : 09:59:36
|
| have you tried using OPENDATASOURCE? something like this...EXEC OPENDATASOURCE('SQLOLEDB' ,'Server=local;Database=Northwind;Integrated Security=SSPI').Northwind.dbo.skt @fromdate, @todate |
 |
|
|
|
|
|