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 |
|
reacha
Starting Member
49 Posts |
Posted - 2010-12-06 : 10:13:48
|
| In one of my SQL procedure i need to use both prod and dev servers because of inconsistency in tablesi dont know the syntax to write.below is the script that i am using but getting an errorIF @PROCESSID = 6BEGIN IF Server Name = 'ROCFDN001QFP03\FDNPRD03' BEGIN SELECT @ScannedDate = COL8 FROM [WFLOW].[WFUSER].[WF_FIELDVALUE_6]WHERE [WFLOW].[WFUSER].[WF_FIELDVALUE_6].PKGID = @pkgid END ELSE IF Server Name = 'RONFDN802Q\FDNDEV03' BEGIN SELECT @ScannedDate = COL6 FROM [WFLOW_Dev].[WFUSER].[WF_FIELDVALUE_6] WHERE [WFLOW_Dev].[WFUSER].[WF_FIELDVALUE_6].PKGID = @pkgid END ENDPlease help me out!!Thanks,reacha |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-12-06 : 10:32:10
|
Can you post the error message? No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2010-12-06 : 10:40:11
|
| MaybeIF @@servername = 'ROCFDN001QFP03\FDNPRD03'==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|