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

Database

 
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 
GeneralRe: Stupid INSERT question for PL-SQL Pin
Nostrom016-Dec-08 10:35
Nostrom016-Dec-08 10:35 
Hi Mika, thank you for the answer.

I believe you are right - I do want to do an UPDATE statement, not an INSERT. Both the source and destination tables already have populate dpart number columns, and both have columns set for teh six flags. I just want to "pour" the data from the source to the destination by part number.

I have tried:

UPDATE  WEB_PRODUCT_TEST_COPY  p
SET     (
		CONTAINS_MARBLE_FLG, 
		IS_MARBLE_FLG, 
		CONTAINS_SMALL_BALL_FLG, 
		IS_SMALL_BALL_FLG, 
		SMALL_PARTS_FLG, 
		BALLOON_FLG
		) =
(SELECT  
		 CONTAINS_MARBLE_FLG, 
		 IS_MARBLE_FLG, 
		 CONTAINS_SMALL_BALL_FLG, 
		 IS_SMALL_BALL_FLG, 
		 SMALL_PARTS_FLG, 
		 BALLOON_FLG
 FROM    TEST_CPSC_BOOL
 WHERE   PART_NUM = p.PART_NO
);


...but I got an "ORA-01427: single-row subquery returns more than one row". I'm looking this up to see what I did wrong.

WEB_PRODUCT_TEST_COPY is the destination table, TEST_CPSC_BOOL is the source table, and the six columns ending in _FLG are Number fields set to 0 or 1. TEST_CPSC_BOOL uses PART_NUM for the part numbers, and WEB_PRODUCT_TEST_COPY uses PART_NO. If it makes any difference, I am using TOAD on an old 8i database...

Oh yes, I rolled back the changes I made to the MV table and the database worked again. I believe I need to just insert the info methodically step by step - i.e. if either the Proc or the MV try to reference columns that don't exist, they won't work.
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 
GeneralRe: How can i extract numeric values from varchar Pin
Blue_Boy16-Dec-08 5:18
Blue_Boy16-Dec-08 5:18 

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.