07-04-2016 04:09 AM - edited 03-01-2019 09:22 AM
I need to execute below sql statement from Tidal using MS-SQL job.can i mention directly with following settings.Is it correct ? and also what i need to mention for parameters tab?
SQL:
UPDATE tab1
SET ExtractStartDt = '2015-04-01 00:00:00.000'
WHERE ExtractID = (SELECT MAX(ExtractID) FROM tab2)
Type:-sql job
Database:-Database name is selected
SQL:
UPDATE tab1
SET ExtractStartDt = '2015-04-01 00:00:00.000'
WHERE ExtractID = (SELECT MAX(ExtractID) FROM tab2)
parameters:
Not sure what i need to mention for parameters tab.
07-04-2016 09:38 AM
There is no requirement to use paramters, if you dont have one
Parameters are used when you want to pass values to the query dynamically. For example, if you want the value of ExtractStartDt to be passed dynamically from a Tidal variable.
Try this ...
UPDATE tab1
SET ExtractStartDt = :TodaysDate
WHERE ExtractID = (SELECT MAX(ExtractID) FROM tab2)
Note the colon prior the variable name. Now, you should see the parameter TodaysDate in the list. Assign any fixed value('2015-04-01 00:00:00.000') or value from a Tidal variable. Then :TodaysDate will be substituted by the value set in the paramter
Useful especially when invoking stored procedures
07-05-2016 06:25 AM
Thanks for input
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide