Click here to Skip to main content
15,916,835 members
Home / Discussions / Database
   

Database

 
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 
AnswerRe: Stupid INSERT question for PL-SQL Pin
Wendelius16-Dec-08 9:12
mentorWendelius16-Dec-08 9:12 
Nostrom0 wrote:
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


If you want to insert new rows to the TABLE_NEW, it would be something like:
INSERT INTO TABLE_NEW (Flag1, Flag2, Flag3...)
SELECT Flag1, Flag2, Flag3...
FROM TABLE_OLD

If you want to restrict the rows that are inserted, add WHERE clause

However, I got the impression that you don't actually want to insert new rows, but to update already existing rows. If that's the case, then it would be like:
UPDATE TABLE_NEW
SET (Flag1, Flag2, Flag3...) = (SELECT Flag1, Flag2, Flag3...
                                FROM TABLE_OLD
                                WHERE TABLE_OLD.PART_NUM=TABLE_NEW.PART_NO)


By the way, did you get the materialized view fixed?

The need to optimize rises from a bad design.My articles[^]

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 
GeneralRe: How can i extract numeric values from varchar Pin
snehasish16-Dec-08 2:26
snehasish16-Dec-08 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.