Re: How to create a view to search records between 1pm yesterday a
From: View (View_at_discussions.microsoft.com)
Date: 02/24/05
- Next message: Sql Fren: "Re: Update statement"
- Previous message: --CELKO--: "Re: Single large join vs. multiple queries"
- In reply to: Andrew J. Kelly: "Re: How to create a view to search records between 1pm yesterday and 7"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 23 Feb 2005 18:39:02 -0800
YES. It's what I was looking for.
Thanks so MUCH.
"Andrew J. Kelly" wrote:
> Why do you need a view to do that? I assume this is the WHERE clause you are
> looking for?
>
>
> SELECT * FROM YourTableOrView
>
> WHERE YourDT >=
> CONVERT(DATETIME,CONVERT(CHAR(8),DATEADD(dd,-1,GETDATE()),112) + ' ' +
> '13:00:00')
> AND YourDT < CONVERT(DATETIME,CONVERT(CHAR(8),GETDATE(),112) + ' ' +
> '07:00:00')
>
> --
> Andrew J. Kelly SQL MVP
>
>
> "View" <View@discussions.microsoft.com> wrote in message
> news:AD50EE4D-9335-4831-8738-C700712C28FF@microsoft.com...
> > How to create view to search records between 1:00pm yesterday an 7:00am
> > today?
>
>
>
- Next message: Sql Fren: "Re: Update statement"
- Previous message: --CELKO--: "Re: Single large join vs. multiple queries"
- In reply to: Andrew J. Kelly: "Re: How to create a view to search records between 1pm yesterday and 7"
- Messages sorted by: [ date ] [ thread ]