Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Query for a DATETIME range 1

Status
Not open for further replies.

LeonelSanchezJr

Programmer
Jan 26, 2001
522
US
I run the query below, but only for a datetime range of
'05/23/01'. How can I do that?

UPDATE Callnotes SET cCallNotes = c.cCallNotes
FROM Callnotes a
INNER JOIN HelpDesk b
ON a.ID=b.icallnoteskey
INNER JOIN Hlpdsk_All c
ON b.cproblemnum=c.cproblemnum
 
Assuming the date appears on one of the tables just add the criteria in a Where clause.

UPDATE Callnotes SET cCallNotes = c.cCallNotes
FROM Callnotes a
INNER JOIN HelpDesk b
ON a.ID=b.icallnoteskey
INNER JOIN Hlpdsk_All c
ON b.cproblemnum=c.cproblemnum
Where a.date1 Between '05/23/01' And '05/23/01'

If the date is on a different table just change the reference (i.e., c.date1). Terry
------------------------------------
Experience is the hardest kind of teacher. It gives you the test first, and the lesson afterward.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top