-
insert values
Hi all
SQL> DESC PROJECT
Name Null? Type
------------------------------- -------- ----
PROJECT_ID NOT NULL VARCHAR2(6)
PHASE NOT NULL VARCHAR2(1)
MUNI NOT NULL VARCHAR2(6)
MCLOSED VARCHAR2(1)
SQL> SELECT PROJECT_ID,PHASE,MUNI,MCLOSED FROM PROJECT;
PROJEC P MUNI M
------ - ------ -
575573 1 520264 N
575573 2 520264 N
575573 3 520264 N
INSERT INTO PROJECT
I NEED INSERT SAME VALUES EXCEPT MUNI TO CHANGE
HOW TO WRITE INSERT COMMAND ON THIS OR PROCEDURE
SQL> SELECT PROJECT_ID,PHASE,MUNI,MCLOSED FROM PROJECT;
PROJEC P MUNI M
------ - ------ -
575573 1 520264 N
575573 2 520264 N
575573 3 520264 N
575573 1 510000 N
575573 2 510000 N
575573 3 510000 N
Thanks for your help
-
Hi, is this what you want?
INSERT INTO PROJECT
SELECT PROJECT_ID,PHASE,MUNI,NULL FROM PROJECT;
"The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb
-
THANKS
Hi if u see my code below from select
The muni is changed
first 3 records initailally a 520000 muni
next 3 records initailally a 510000 muni
how to insert same values from first set except muni as different
Thanks for your help
-
Hi,
Try this out :
insert into project (PROJECT_ID,PHASE,MUNI,MCLOSED)
select PROJECT_ID,PHASE, <>,MCLOSED from project;
This wil insert all rows from project table with the new value you type for MUNI column.
Regards,
Aparna S.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|