![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| If statement - How to write a null statement | april | Shell Programming and Scripting | 3 | 04-16-2008 01:14 PM |
| (sed) parsing insert statement column that crosses multiple lines | jjordan | Shell Programming and Scripting | 3 | 10-09-2007 12:23 AM |
| Script does not execute Insert Statement | Amruta Pitkar | Shell Programming and Scripting | 4 | 08-24-2006 11:14 PM |
| Insert TAB in echo statement | sunils27 | Shell Programming and Scripting | 5 | 08-26-2005 03:36 AM |
| awk command for INSERT statement | nattynatty | Shell Programming and Scripting | 4 | 05-10-2002 02:11 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How is use sselect statement o/p in insert statement.
Hi All,
I am using Unix ksh script. I need to insert values to a table using the o/p from a slelect statement. Can anybody Help! My script looks like tihs. ---`sqlplus -s username/password@SID << EOF set heading off set feedback off set pages 0 insert into ${TB_NAME}_D (select A.${PRI_KEY1}, A.${PRI_KEY2, A.${PRI_KEY3}, ${col_name}, - this is variable from script A.${col_name}, B.${col_name} from ${TB_NAME} A, ${DEV_DB}.${TB_NAME} B where A.${PRI_KEY1}=B.${PRI_KEY1} and A.${PRI_KEY2}=B.${PRI_KEY2} and A.${PRI_KEY3}=B.${PRI_KEY3} and A.${col_name}!=B.${col_name} and ROWNUM <= ${THRESHOLD}) ; commit; exit; EOF` Thanks in advance |
|
||||
|
I got the script to run
I forgot to close the brace after Primary_key2 and quotes for the shell variable.
Thanks for your reply. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|