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

Basic INSERT question

Status
Not open for further replies.

jpillonel

Programmer
Dec 17, 2003
61
CH
Hello,

I have a basic question regarding an insert.

This is what I actually do on DTS package on ms sql 2000:

" insert into logtable (Rows_before)
(select count(no_empl) from assures) "

I want to change to add a new "static" value like this but it doesn't works, any have an idea ???

" insert into logtable (domaine, Rows_before)
VALUES ('assur', (select count(no_empl) from assures)) "

Thanks for your help
 
Code:
insert 
  into logtable 
     ( domaine
     , Rows_before )
select 'assur'
     , count(no_empl) 
  from assures

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top