?
Solved

Sql 2005: Insert into - Combining table with static data

Posted on 2007-08-09
4
Medium Priority
?
296 Views
Last Modified: 2013-11-05
Is there a way to insert data from a table with static data..

Have table 1;
ID    value1       value2   comment   team  
have table 2:
ID  value1         value 2
1      2                  3
2      3                  4  
*************************************************
Would like to be able to put data from table 2 into table 1 plus enter for comment and team values like
comment = commenthere and team = teamhere..kinda thing...
0
Comment
Question by:TechMonster
  • 3
4 Comments
 
LVL 19

Expert Comment

by:Limbeck
ID: 19661028
hi, you mean like this or should every row have diff. comments?

INSERT INTO Tabel1
SELECT ID,value1,value2,"commenthere","teamhere"
FROM Tabel1;
0
 
LVL 19

Accepted Solution

by:
Limbeck earned 2000 total points
ID: 19661029
make that

INSERT INTO Tabel1
SELECT ID,value1,value2,"commenthere","teamhere"
FROM Tabel2;
0
 

Author Comment

by:TechMonster
ID: 19661054
Awesome...thank you very much!!!
0
 
LVL 19

Expert Comment

by:Limbeck
ID: 19661060
your welcome :) glad to be of help.

Ed.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Integration Management Part 2
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question