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 Rhinorhino 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
Joined
Dec 17, 2003
Messages
61
Location
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.

Similar threads

Replies
0
Views
440
Replies
7
Views
541
Replies
1
Views
294
Replies
2
Views
257

Part and Inventory Search

Sponsor

Back
Top