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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Insert Simple Basic Question

Status
Not open for further replies.

azzi2000

MIS
Jan 28, 2004
145
US
Sql:
TableToUpdate = sitem, sdescription, nprice, dtdate, nver
TableToLoad = item, desc,nprice
I need to insert items From TableToload into TableToUpdate with set dtdate=#4/14/2005# ad nver=1 for the matched ones.
I am using:
Insert into TabletoUpdate
(sItem,sdescription,nprice)
select
item, desc,nprice
From TableToLoad

Please advice,
Thank you.
Dré
 
Code:
Insert into TabletoUpdate
(sItem,sdescription,nprice)
select
item, [desc],nprice
From TableToLoad
WHERE dtdate = =#4/14/2005#
and nver=1

[bandito] [blue]DBomrrsm[/blue] [bandito]

[blue]Software code, like laws and sausages, should never be examined in production[/blue][black] - [/black][purple]Edward Tenner[/purple]
 
Thank you for your response.
I was able to figure it out
That is the code used:

Insert into TabletoUpdate
(sItem,sdescription,nprice,dtdate,nver#,1)
select
item, [desc],nprice,#4/14/2004#,1
From TableToLoad

Thank you.
Dré
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top