Insert from a table to another

2001-04-27 Thread Roland . Skoldblom
Any one whom can give me a good advice, on a pl/sql procedure, that delete data from table a, then runs a query from table b and and that insert this query into table a. Pleas help me with a good example. Thanks Roland Sköldblom -- Please see the official ORACLE-L FAQ: http

Re: Insert from a table to another

2001-04-27 Thread William Beilstein
CREATE MY_TABLE(TEST1 NUMBER,TEST2 VARCHAR2(10)); DELETE FROM MY_TABLE; INSERT INTO MY_TABLE SELECT VALUE1,STRING2 FROM MY_OTHER_TABLE WHERE VALUE3 = 7; This insert would insert into MY_TABLE the columns value1 and string2 from the table my_other_table where the column value3 is equal to 7

Re: Insert from a table to another

2001-04-27 Thread james ellis
You can do a simple insert/select statement within pl/sql declare begin insert into table_a (select * from table_b); end; / if all the columns are in the same order in both tables. If not list the columns out. James --- [EMAIL PROTECTED] wrote: Any one whom can give me a good advice

PL/SQL-delete, insert

2001-04-19 Thread Roland . Skoldblom
Can anyone give me an example of an pl/sql-procedure, that first delete rows from a table and afterwards insert values in that table. This should be in the same procedure. Thanks for the help I can get on this, a good example. Roland Skldblom -- Please see the official ORACLE-L FAQ: http

Insert ... nologging

2001-04-19 Thread Yosi
Hello all, I'm trying to do inserts with NOLOGGING. It works if I don't specify insert columns OR if I have no where clause. If I have EITHER insert column specification OR a where clause, Oracle can't interpret the SQL. HELP PLEASE!! The following syntax works fine: -- 1. This has

RE: Insert ... nologging

2001-04-19 Thread Vadim Gorbounov
Yosi, I suggest you the following syntax for direct path insert with nologging option: insert /*+ APPEND NOLOGGING */ into tab1 select from tab2; The word NOLOGGING in your first insert is treated as table alias (and really does nothing with nologging), i believe, otherwise the statement

RE: Insert ... nologging

2001-04-19 Thread Yosi
Thank you. I wish I would have realized that the nologging was becoming an alias. :-( Yosi -Original Message- From: Vadim Gorbounov [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 5:30 PM To: Multiple recipients of list ORACLE-L Subject: RE: Insert ... nologging Yosi

Insert Cardinalities into the data dictionary directly

2001-04-18 Thread Murali Vallath
I am trying again -- To obtain a good analysis of a SQL statement especially in a new development environment, based on the environment that it is to be deployed on, it would good to sometime reflect/simulate the production volume. Is there a way to input table cardinalities directly

RE: Insert Cardinalities into the data dictionary directly

2001-04-18 Thread MacGregor, Ian A.
Take a look at dbms_stats.set_column_stats and dbms_stats.set_table_stats. The latter allows you to set the number of rows, the size of the table and such ; the first allows you to set the number of distinct values for a column the number of nulls, etc. I'm not sure what you are trying to

RE: Insert Cardinalities into the data dictionary directly

2001-04-18 Thread Murali Vallath
Thanks for the feedback, I am coming from the Oracle Rdb world, where these row counts/cardinialities could be inserted into the data dictionary to simulate the optimizer behaviour similar to a production environment. I see your point, this could be a negative impact to the optimizer. Thanks

RE: Insert Cardinalities into the data dictionary directly

2001-04-18 Thread Hillman, Alex
One of interesting uses of this feature is creation of statistics for temporary tables which cannot be done otherwise. It is Tom Kite's idea. Alex Hillman -Original Message- Sent: Wednesday, April 18, 2001 1:15 PM To: Multiple recipients of list ORACLE-L Take a look at

Re: Insert

2001-03-27 Thread Saurabh Sharma
well Kevin Kostyszyn, this is true that often we ignore such small issues which sometime impact the performance a lot. ya, it's good if we do inserts and then rebuild the indexes, but generally not done during usual work., since every time u insert records , oracle rebuilds the index itself

RE: Insert

2001-03-27 Thread Hillman, Alex
PROTECTED]] Sent: Tuesday, March 27, 2001 3:31 AM To: Multiple recipients of list ORACLE-L Subject:Re: Insert well Kevin Kostyszyn, this is true that often we ignore such small issues which sometime impact the performance a lot. ya, it's

Re: Insert

2001-03-27 Thread james ellis
Yes inserting into a table with an index does cause degradation in the process, but it is very unrealistic to drop and rebuild the index every time you do an insert, unless it is a batch process that runs when no other processing is being done. Also, deleting from the index causes the index

RE: Insert

2001-03-27 Thread Toepke, Kevin M
Just to add my $0.02 I was working on a large ODS project where we had to process 8+ million records each night into an Oracle 8i database sitting on a RAID-5 disk array. At the start of the processing we trucated the table. We used parallel direct-path SQL*Loader (12 instances). We had

Insert

2001-03-26 Thread Kevin Kostyszyn
Hi DBA's, One of my developers just asked me a question, and honestly I don't know what he's talking about. But, it made me think of my own that I do know the answer to or at least I used to:( Anyway, when doing an insert into a table, doesn't it increase performance to delete any

Insert without telling column names

2001-03-20 Thread Roland . Skoldblom
Hallo, How can I create an insert statement without telling all the names of the columns? Give an example, please. Roland Skldblom -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] Fat City Network Services-- (858) 538-5051 FAX: (858

Re: Insert without telling column names

2001-03-20 Thread David A. Barbour
Roland, You can't. There are a number of ways to really cut down on the code required to do an insert, but if you think about it, how will Oracle know where the data is supposed to go if you don't give it the column name(at some point)? If you're using 8i, there is a direct load insert

Re: Insert without telling column names

2001-03-20 Thread jkstill
On Tue, 20 Mar 2001 [EMAIL PROTECTED] wrote: Hallo, How can I create an insert statement without telling all the names of the columns? Give an example, please. Roland Sköldblom Roland, You can omit column names only if you are inserting into all columns of the table, in the same order

Re: Insert without telling column names

2001-03-20 Thread Ruth Gramolini
Here is what my sqlplus training (Oracle) says: Inserting New Rows Insert a new tow containing values for each column. Optionally lisgt the columsn in the INSERT clause. HTH, Ruth - Original Message - To: "Multiple recipients of list ORACLE-L" [EMAIL PROTECTED] Sent: Tues

RE: Insert without telling column names

2001-03-20 Thread Jacques Kilchoer
Title: RE: Insert without telling column names -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] How can I create an insert statement without telling all the names of the columns? Give an example, please. As Jared mentioned, if you are inserting into all

RE: Insert without telling column names

2001-03-20 Thread Diana Duncan
Roland, Check out the SQL manual, the syntax diagram clearly illustrates that you don't need to explicitly name the column names as long as you are inserting into all of the columns in the order they are defined in the data dictionary. insert into table_A values ('Hi', 'there'); A word

Re: Insert without telling column names

2001-03-20 Thread Regina Harter
At 08:36 AM 3/20/01 -0800, you wrote: Roland, You can't. There are a number of ways to really cut down on the code required to do an insert, but if you think about it, how will Oracle know where the data is supposed to go if you don't give it the column name(at some point)? Of course you can

Re: Insert without telling column names

2001-03-20 Thread David A. Barbour
Hi all - I stand (sit?) before you with egg on my face. I KNOW you can insert without naming column names if you're filling the entire row, I just didn't consider that this might be what Roland was attempting to accomplish. As Regina and Jacques both pointed out, if your package, procedure

RE: Insert without telling column names

2001-03-20 Thread jkstill
Well of course it's a bad idea, I thought that was obvious. ;) Jared On Tue, 20 Mar 2001, Jacques Kilchoer wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] How can I create an insert statement without telling all the names of the columns? Give

Re: to insert into blob

2001-03-14 Thread chaoping
hi, gurus: i read the article of early time e and tried my self, hoping to insert a bin file into a lob column of the database.but failed. my env: win2000 prof+oracle817. SQL desc lobtable Name Null?Type

Re: Insert

2001-03-07 Thread Saurabh
I feel u can't insert in this way. this way it will only insert value given by u when it prompts. if u give then it will insert that only, else if u had to give the entire value after the sign in the original value. i think the best way is to change the default define character with one

Re: Insert

2001-03-07 Thread Eriovaldo do Carmo Andrietta
it asks for value just enter .It'll insert ATT.This is very simple way wothout bothring about put in strings or double quotes.You can try that also Cheers Ganti --- The contents of this e-mail are confidential to the ordinary

Insert

2001-03-06 Thread Krishna Rao K
Hi, What is the best way to Insert when we have '' as part of our string. I want to frame INSERT statements such as the one below, and pass on to the user. insert_customers.sql: INSERT INTO customers (customer_name) VALUES ('Sun Microsystems'); INSERT INTO customers (customer_name) VALUES

RE: Insert

2001-03-06 Thread Jacques Kilchoer
Title: RE: Insert -Original Message- From: Krishna Rao K [mailto:[EMAIL PROTECTED]] Sent: mardi, 6. mars 2001 12:07 What is the best way to Insert when we have '' as part of our string. I want to frame INSERT statements such as the one below, and pass on to the user

Re: to insert into blob

2001-02-20 Thread Marin Dimitrov
- Original Message - To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Sent: Monday, February 19, 2001 23:40 I have a wav file and I have to insert it into a table with column blob type. How do I do this. If u're working with JDBC then u should just open the OutputStream

HELP - Insert/Update trigger

2001-02-13 Thread Fred Smith
Listers, I am attempting to write a trigger on a table that will have batch inserts nightly. I want each insert to check to see if a record with that primary key exists, and if it does, update the record. If the primary key does not yet exist in the table, insert the record. The batch

RE: HELP - Insert/Update trigger

2001-02-13 Thread Norrell, Brian
Not with a normal table trigger. Try creating a non-updateable view with an "instead of" trigger for the insert. Brian Norrell Senior Software Engineer QuadraMed 972-831-6600 -Original Message- Sent: Tuesday, February 13, 2001 9:26 AM To: Multiple recipients of list ORACLE-L

RE: HELP - Insert/Update trigger

2001-02-13 Thread Fred Smith
What is the purpose of the non-updateable view? -FS From: "Norrell, Brian" [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Subject: RE: HELP - Insert/Update trigger Date: Tue, 13 Feb 2001 09:56:15 -0800 Not with a normal tab

RE: HELP - Insert/Update trigger

2001-02-13 Thread Dasko, Dan
Dang it, Brian you're right, I didn't read the original post thoroughly. Instead of batch inserts, do batch updates and in the exception handler, do the insert. Or you could use the %FOUND flag based on a select PK from table. Dan -Original Message- Sent: Tuesday, February 13, 2001 12

RE: HELP - Insert/Update trigger

2001-02-13 Thread Dasko, Dan
Yes, it can be done, I'd write the trig to do a select on that PK and if %FOUND is true, update otherwise in the exception handler for that block, do the insert. begin .. begin select PK from table; UPDATE exception INSERT end .. end Dan -Original Message- Sent

RE: HELP - Insert/Update trigger

2001-02-13 Thread Norrell, Brian
I have never worked directly with "instead of" triggers, but their intent is to be used on a non-updateable view. For instance: SQL create view all_emps as select * from emps UNION select * from archived_emps; SQL insert into all_emps (...); The RDBMS then says "Which

RE: How to insert data in LOBs

2001-02-09 Thread Trassens, Christian
If you use CLOB, you can insert text in the same way as with varchar2. If you have BLOB, you'll probably need the function utl_raw or dbms_lob. However with BFILE, you should create a directory with the stmt: CREATE DIRECTORY and insert using BFILENAME expression. Then you have the function

Re: How to insert data in LOBs

2001-02-09 Thread Saurabh Sharma
thanks it worked fine. but how if i want to insert some file(text,word) or some image file to a blob. and i did'nt understood how to querry such table with LOBs. thanks again for the guidance. saurabh - Original Message - To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Sent

RE: How to insert data in LOBs

2001-02-08 Thread Trivedi, Hitarth
, February 08, 2001 8:32 AM To: Multiple recipients of list ORACLE-L hi all, i want to know how to insert values i.e. text/word or images in a table's LOB column. can we insert them with the regular insert command. please help in this regard. thanks in advance.. saurabh FCS Software Solutions Ltd

Re: Insert data into LOB column

2001-02-07 Thread Marin Dimitrov
- Original Message - To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Sent: Wednesday, February 07, 2001 02:35 I am new to working with LOBs. I want to insert data (through SQL or PL/SQL) into a table that looks like this: column1 varchar2(100) column2 BLOB column3

Insert data into LOB column

2001-02-07 Thread Helmut Daiminger
Hi! I am new to working with LOBs. I want to insert data (through SQL or PL/SQL) into a table that looks like this: column1 varchar2(100) column2 BLOB column3 number How can I insert data into that table directly? insert into table (column1, colum2, column3) values

<    1   2   3   4