Click here to Skip to main content
15,886,872 members
Home / Discussions / Database
   

Database

 
QuestionBuilt-In Functions Myth!!! Pin
Gamzun17-Dec-08 8:48
Gamzun17-Dec-08 8:48 
Questionstored procedure. [modified] Pin
Talsaniya Jayesh17-Dec-08 5:00
professionalTalsaniya Jayesh17-Dec-08 5:00 
AnswerRe: stored procedure. Pin
Wendelius17-Dec-08 6:01
mentorWendelius17-Dec-08 6:01 
QuestionStore Procedure parameter Pin
faizurrahman17-Dec-08 1:26
faizurrahman17-Dec-08 1:26 
AnswerRe: Store Procedure parameter Pin
Ashfield17-Dec-08 2:27
Ashfield17-Dec-08 2:27 
GeneralRe: Store Procedure parameter Pin
faizurrahman18-Dec-08 0:07
faizurrahman18-Dec-08 0:07 
GeneralRe: Store Procedure parameter Pin
Ashfield18-Dec-08 0:15
Ashfield18-Dec-08 0:15 
QuestionStupid INSERT question for PL-SQL Pin
Nostrom016-Dec-08 8:58
Nostrom016-Dec-08 8:58 
I have two tables, TABLE_OLD and TABLE_NEW, like so:

TABLE_OLD
PART_NUM	Flag1	Flag2	Flag3
===============================
223		1	0	0
344		0	0	1
877		0	1	1
878		1	0	0

TABLE_NEW
PART_NO		Flag1	Flag2	Flag3
===============================
223		NULL	NULL	NULL
344		NULL	NULL	NULL
877		NULL	NULL	NULL
878		NULL	NULL	NULL


I want to insert the data from the three columns in the old table, Flag1, Flag2, and Flag3, into their corresponding columns in the new table for each matching part number. The new table has matching columns of the same data type, the cells are just empty.

Most if teh INSERT examples I have seen so far deal with simple inserts of hard-coded data, not this sort of situation. Is the query I want to run something like this?:

INSERT INTO 
	TABLE_NEW.Flag1
	TABLE_NEW.Flag2
	TABLE_NEW.Flag3
FROM 
	TABLE_OLD.Flag1
	TABLE_OLD.Flag2
	TABLE_OLD.Flag3
WHERE TABLE_OLD.PART_NUM=TABLE_NEW.PART_NO;


Thanks for any help.
AnswerRe: Stupid INSERT question for PL-SQL Pin
Wendelius16-Dec-08 9:12
mentorWendelius16-Dec-08 9:12 
GeneralRe: Stupid INSERT question for PL-SQL Pin
Nostrom016-Dec-08 10:35
Nostrom016-Dec-08 10:35 
GeneralRe: Stupid INSERT question for PL-SQL Pin
Wendelius16-Dec-08 10:47
mentorWendelius16-Dec-08 10:47 
GeneralRe: Stupid INSERT question for PL-SQL Pin
Nostrom016-Dec-08 11:20
Nostrom016-Dec-08 11:20 
GeneralRe: Stupid INSERT question for PL-SQL Pin
Wendelius16-Dec-08 11:27
mentorWendelius16-Dec-08 11:27 
GeneralRe: Stupid INSERT question for PL-SQL Pin
Nostrom016-Dec-08 11:53
Nostrom016-Dec-08 11:53 
GeneralRe: Stupid INSERT question for PL-SQL Pin
Wendelius16-Dec-08 12:05
mentorWendelius16-Dec-08 12:05 
AnswerRe: Stupid INSERT question for PL-SQL Pin
Chris Meech16-Dec-08 10:56
Chris Meech16-Dec-08 10:56 
QuestionSelect After Update Pin
Sunset Towers16-Dec-08 3:54
Sunset Towers16-Dec-08 3:54 
AnswerRe: Select After Update Pin
Sunset Towers16-Dec-08 5:17
Sunset Towers16-Dec-08 5:17 
GeneralRe: Select After Update [modified] Pin
Wendelius16-Dec-08 6:04
mentorWendelius16-Dec-08 6:04 
GeneralRe: Select After Update [modified] Pin
Syed Mehroz Alam16-Dec-08 7:24
Syed Mehroz Alam16-Dec-08 7:24 
GeneralRe: Select After Update Pin
Wendelius16-Dec-08 8:14
mentorWendelius16-Dec-08 8:14 
GeneralRe: Select After Update Pin
Syed Mehroz Alam16-Dec-08 18:02
Syed Mehroz Alam16-Dec-08 18:02 
GeneralRe: Select After Update Pin
Wendelius17-Dec-08 6:02
mentorWendelius17-Dec-08 6:02 
QuestionHow can i extract numeric values from varchar Pin
snehasish15-Dec-08 19:57
snehasish15-Dec-08 19:57 
AnswerRe: How can i extract numeric values from varchar Pin
Blue_Boy15-Dec-08 23:11
Blue_Boy15-Dec-08 23:11 

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.