all groups > sql server dts > july 2006 >
You're in the

sql server dts

group:

why do i get rowset from execute sql task only when there is no where clause, when both with/out clausegives exact same result


why do i get rowset from execute sql task only when there is no where clause, when both with/out clausegives exact same result mistonl NO[at]SPAM mail.com
7/20/2006 11:02:03 AM
sql server dts:

have execute sqltask that quieres table and gets name of DTS, outputs to
parameter as rowset, then in activex script i go thru it to process.

sql task has output pararmeter rowset of gvDTSPackagesToRun

query:
select dts_package_name from Rerun_DTS_Package

result
----
XXX

get a rowset via
dim RS
set RS = CreateObject("ADODB.Recordset")
set RS = DTSGlobalVariables("gvDTSPackagesToRun").Value

however if i change query to

select dts_package_name from Rerun_DTS_Package
where Date_of_request > (SELECT LastStartTime FROM
dbo.NBT_LogBatch WHERE (ProcessName = 'DTS: NBT_OnDemand_ReRun_DTS') )

result
---
XXX

but rowset in activex script is empty


both queires give exact same result yet 2nd gives no output rowset

also tried
ISNULL(dts_package_name, 'ZZZZZ' ) dts_package_name
Re: why do i get rowset from execute sql task only when there is no where clause, when both with/out clausegives exact same result mistonl NO[at]SPAM mail.com
7/20/2006 2:26:02 PM
[quoted text, click to view]

doscoverd error of my ways. i save the laststarttime as a getdate(). when it
is compared to the date_request it will never match since getdate() is stored
as a binary not as a datetime. once i do a conversion to datetime then it
AddThis Social Bookmark Button