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

Insert data via a case statement

Status
Not open for further replies.

dhulbert

Technical User
Jun 26, 2003
1,136
GB
I'm trying to insert a line of data into a table dependant on the result of a case statement.

So look at the table 'Data_Table' if there is a row where the date = 'Run Date' then do nothing
Else insert a row of data with 'Run Date', 'Header' and 'Colour'

Any help would be appreciated.


I love deadlines. I like the whooshing sound they make as they fly by
Douglas Adams
(1952-2001)
 

select Run Date, Header, Colour
into Newtable
from datatable
where date <> @Run_Date


Simi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top