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 2008 Forums
 Transact-SQL (2008)
 Query Help

Author  Topic 

tooba
Posting Yak Master

224 Posts

Posted - 2012-10-22 : 21:59:58
Hi guys,

Need help in sql query, Let me let you what i need, during the S.P i want to like
to use if EID = 0 and PID = 0 then don't run UDF,
Here is the syntax

LEFT OUTER JOIN Information_Sales A ON Case IF EID = 0 or PID = 0 then SID = 148 ELSE UDF.NEW (EID,PID) = A.SID

Please let me know if my question is not clear.

Thanks in advance..

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-10-22 : 22:07:24
is this what you want ?

LEFT OUTER JOIN Information_Sales A
ON A.SID = Case WHEN EID = 0 AND PID = 0 then 148 ELSE UDF.NEW (EID,PID) END



KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

tooba
Posting Yak Master

224 Posts

Posted - 2012-10-22 : 22:27:57
Awesome, Thank You for your help....
Go to Top of Page
   

- Advertisement -