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
 General SQL Server Forums
 New to SQL Server Programming
 How to code this ?

Author  Topic 

sadbjp
INNER JOIN

41 Posts

Posted - 2007-05-14 : 10:41:00
Hi,

How can write this in a query:

If @maxLastUpdate is later than LastUpdate, call stored procedure usp_RubricReportUpdate @DataYears, @County, @Distirct to update the report.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-05-14 : 10:43:12
[code]
If @maxLastUpdate is later than > LastUpdate
call stored procedure exec usp_RubricReportUpdate @DataYears, @County, @Distirct to update the report.
[/code]


KH

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-05-14 : 10:44:55

If exists(Select * from table where @maxLastUpdate > LastUpdate)
exec usp_RubricReportUpdate @DataYears, @County, @Distirct



Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-05-14 : 10:53:10
SADBJP, don't keep wasting our time!
Please state a real world problem and we will help yousolve it.

It all started here
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=83479

continued here...
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=83482

and last here...
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=83546


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -