June 8, 2010 at 4:28 pm
SELECT
*
FROM Table1
WHERE
mydate =convert(varchar, getdate(), 111)
I am running this query in SSIS.I have data with todays date but I cant return the data with the above sql.It runs good in sql analyser but does not return data in SSIS.Appreciate reponses.
sqlserver version 2000
Thanks
June 9, 2010 at 12:28 am
Any errors?
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
June 10, 2010 at 11:48 am
no errors...the above sql does not return any data.
June 10, 2010 at 11:56 am
The dates in the database are stored as VARCHAR?
In order to help you, I'd need to know the table structure and data of the table.
--J
June 11, 2010 at 8:19 am
I have tried your code and tested using
print CONVERT(nvarchar(30), GETDATE(), 111)
print len(CONVERT(nvarchar(30), GETDATE(), 111))
This returns :
2010/06/11
10
Regards
June 11, 2010 at 9:06 am
Problem, we can't see what you see from where we sit. We don't know how your data is stored, nor do we know the structure of the table involved. We really could use more information to help you.
Please read the first article I have referenced below in my signature block regarding asking for help.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply