I have a SQL Server 2000 database with the table listed below.
I would like to write sql statement from the table listed below to display
of the
fields in the table using datediff function where begin_time - end_time is
greater than 2 minutes.
Please help me complete this task.
Table City_Time
Name varchar(25),
City varchar(35),
State varchar(2),
Begin_Time datetime,
End_Time datetime
Could it be as simple as one of these?
SELECT *
FROM City_Time
WHERE datediff(second, Begin_Time, End_Time) > 120
or
SELECT *
FROM City_Time
WHERE datediff(minute, Begin_Time, End_Time) > 2
Roy Harvey
Beacon Falls, CT
On Tue, 30 Jan 2007 20:15:01 -0800, Joe K.
<JoeK@.discussions.microsoft.com> wrote:
>I have a SQL Server 2000 database with the table listed below.
>I would like to write sql statement from the table listed below to display
>of the
>fields in the table using datediff function where begin_time - end_time is
>greater than 2 minutes.
>Please help me complete this task.
>Table City_Time
>Name varchar(25),
>City varchar(35),
>State varchar(2),
>Begin_Time datetime,
>End_Time datetime
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment