question

Neil-9764 avatar image
0 Votes"
Neil-9764 asked Neil-9764 answered

Dates not getting assigned to variable from ESQL task

I am trying to assign Date values from ESQL task to a date variable, it is getting executed without assigning any value to date variable

SELECT MAX(lastupdateddate) AS lastupdateddate,MAX(id) AS sourceseqid FROM Pat

it is taking some junk value as "12/30/1899" and null for sequence

ESQL (general)- >ResultSet - Single row
Connection type-> OLEDB
SQL Statement ->SELECT MAX(lastupdateddate) AS lastupdateddate,MAX(id) AS sourceseqid FROM Pat
ESQL (resultset) -> Result Name: lastupdateddate -Variable Name User::vLastUpdatedDate
Result Name: sourceseqid Variable name : User::vSourceSeqId

Any idea why it may be happening ? All the variable scope is at package level

sql-server-integration-services
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Neil-9764 avatar image
0 Votes"
Neil-9764 answered

This is resolved. I added script task to check the date if it is getting updated.

I found that the correct date was getting reflected, it was only the variable declaration section it was showing old junk default date(not sure why this is happening but I am getting the correct date passed into variables).

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.