Re: Data Driven Query - Lookup where Clause
From: Allan Mitchell (allan_at_no-spam.sqldts.com)
Date: 03/22/04
- Next message: Allan Mitchell: "Re: SQL Task inserting duplicate rows"
- Previous message: Sue Hoegemeier: "Re: Diagrams"
- In reply to: Peter Newman: "Data Driven Query - Lookup where Clause"
- Next in thread: Peter Newman: "Re: Data Driven Query - Lookup where Clause"
- Reply: Peter Newman: "Re: Data Driven Query - Lookup where Clause"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 22 Mar 2004 14:58:32 -0000
You can convert the smalldatetime values to the YYYYMMDD format by using
(and presuming SQL Server)
CONVERT(CHAR(8),DateField,112)
-- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Peter Newman" <anonymous@discussions.microsoft.com> wrote in message news:4EF2BCC8-62BB-4191-8ED2-5A45B7957548@microsoft.com... > im trying to write a lookup query for a Data driven Query. Im having problems with one part of the query which is in the 'where' clause. > > im trying to compare a string value from a text file to a smalldatetime value. > > Smaledatetime value = 2004-02-27 00:00:00:00 > textfile value = '20040227' > > im looking to get the record where the smalldatetime value = textfile value. > Ive tried converting the textfile value to '27/02/2004' but am getting nowhere
- Next message: Allan Mitchell: "Re: SQL Task inserting duplicate rows"
- Previous message: Sue Hoegemeier: "Re: Diagrams"
- In reply to: Peter Newman: "Data Driven Query - Lookup where Clause"
- Next in thread: Peter Newman: "Re: Data Driven Query - Lookup where Clause"
- Reply: Peter Newman: "Re: Data Driven Query - Lookup where Clause"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|