Click here to Skip to main content
15,868,141 members
Home / Discussions / Database
   

Database

 
AnswerRe: VA Database Pin
R. Giskard Reventlov24-May-13 5:15
R. Giskard Reventlov24-May-13 5:15 
GeneralRe: VA Database Pin
PIEBALDconsult24-May-13 11:45
mvePIEBALDconsult24-May-13 11:45 
AnswerRe: VA Database Pin
jschell24-May-13 12:43
jschell24-May-13 12:43 
QuestionCreate Mysql Music Database Help Pin
Muveen_Delhi23-May-13 22:28
Muveen_Delhi23-May-13 22:28 
AnswerRe: Create Mysql Music Database Help Pin
Eddy Vluggen24-May-13 3:02
professionalEddy Vluggen24-May-13 3:02 
GeneralRe: Create Mysql Music Database Help Pin
Muveen_Delhi24-May-13 18:08
Muveen_Delhi24-May-13 18:08 
GeneralRe: Create Mysql Music Database Help Pin
Mycroft Holmes26-May-13 12:51
professionalMycroft Holmes26-May-13 12:51 
QuestionINSERT - SELECT QUERY Help Needed. Pin
codingrocks23-May-13 9:00
codingrocks23-May-13 9:00 
I have the following tables.

Table SS

SID SNAME
== =====
1 AAA
2 BBB
3 CCC

Table PP

PID PNAME
== =====
1 Phase1
2 Phase2
3 Phase3

Third table (COMP) data may look like the following.

ID SID PID
== === ===
1 1 1
2 1 2
3 1 3
4 2 1
5 2 2

ID here in third table is autoincrement. I need to insert a new record in SS table and it can have mapping to many Phases in PP table.

So I want to write a
INSERT INTO COMP (col1,col2)
SELECT (col1,col2)
FROM table...

So ultimately new records needs to be inserted into the last table with a SID map and different PID.

How can I accomplish the same?

Thanks in advance.
CodingRocks

ASP.NET,C#.NET Programmer
BANGALORE

"Winners don't do different things. They do things differently. ...

AnswerRe: INSERT - SELECT QUERY Help Needed. Pin
Mycroft Holmes23-May-13 11:15
professionalMycroft Holmes23-May-13 11:15 
QuestionHey need help of adding data T__T Pin
Al Arcilla23-May-13 4:54
Al Arcilla23-May-13 4:54 
AnswerRe: Hey need help of adding data T__T Pin
Simon_Whale23-May-13 5:16
Simon_Whale23-May-13 5:16 
AnswerRe: Hey need help of adding data T__T Pin
Eddy Vluggen24-May-13 0:23
professionalEddy Vluggen24-May-13 0:23 
AnswerRe: Hey need help of adding data T__T Pin
Al Arcilla26-May-13 3:50
Al Arcilla26-May-13 3:50 
Questiondisributed database (in one computer(at sql 2008)/two server)؟? Pin
22majid2222-May-13 19:44
22majid2222-May-13 19:44 
AnswerRe: disributed database (in one computer(at sql 2008)/two server)؟? Pin
Mycroft Holmes22-May-13 22:07
professionalMycroft Holmes22-May-13 22:07 
QuestionSelect in SP slower than non-SP ? Pin
Saxet22-May-13 7:16
Saxet22-May-13 7:16 
QuestionRe: Select in SP slower than non-SP ? Pin
Eddy Vluggen22-May-13 7:36
professionalEddy Vluggen22-May-13 7:36 
AnswerRe: Select in SP slower than non-SP ? Pin
Saxet22-May-13 8:03
Saxet22-May-13 8:03 
GeneralRe: Select in SP slower than non-SP ? Pin
Eddy Vluggen22-May-13 8:20
professionalEddy Vluggen22-May-13 8:20 
GeneralRe: Select in SP slower than non-SP ? Pin
PIEBALDconsult22-May-13 14:54
mvePIEBALDconsult22-May-13 14:54 
GeneralRe: Select in SP slower than non-SP ? Pin
Saxet23-May-13 3:49
Saxet23-May-13 3:49 
GeneralRe: Select in SP slower than non-SP ? Pin
PIEBALDconsult23-May-13 13:42
mvePIEBALDconsult23-May-13 13:42 
AnswerRe: Select in SP slower than non-SP ? Pin
Bernhard Hiller22-May-13 21:28
Bernhard Hiller22-May-13 21:28 
QuestionData Clashes Pin
Bram van Kampen21-May-13 15:04
Bram van Kampen21-May-13 15:04 
AnswerRe: Data Clashes Pin
David Mujica22-May-13 2:26
David Mujica22-May-13 2:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.