I want to insert records to the table test1 from table prueba, for example
insert into test1
(fecha,momento,antes)
values
(select
fecha,momento from prueba);
when i runinng this script i was recived the following errors
ORA-00604: error occurred at recursive SQL level 1
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 8
ORA-00936: missing expression
6 10044
I want to insert records to the table test1 from table prueba, for example
insert into test1
(fecha,momento,antes)
values
(select
fecha,momento from prueba);
when i runinng this script i was recived the following errors
ORA-00604: error occurred at recursive SQL level 1
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 8
ORA-00936: missing expression
***********************
hey i m a beginner,3 months work exp,still trying
i think ur query should b something like this
insert into test1
(fecha,momento,antes)
select
fecha,momento,some_column from prueba;
u wanna insert into 3 columns and providing 2 values,and "values' keyword also wont b used
regards,
lipsa
*************************
Hey i don't understand your answer.
In this case explain me the similars errors - insert into cli_tab_19_old
-
(MOD_19_TAB_NUM_COD,
-
MOD_19_TAB_DES_NOR,
-
MOD_19_TAB_ESP_COD,
-
MOD_19_TAB_BAR_COD,
-
MOD_19_TAB_BAR_PRE,
-
MOD_19_TAB_REQ_DIA,
-
MOD_19_TAB_DIA_EST,
-
MOD_19_TAB_1ER_COD,
-
MOD_19_TAB_2DO_COD,
-
MOD_19_TAB_ANE_COD,
-
MOD_19_TAB_ESP_DES,
-
MOD_19_TAB_1ER_DES,
-
MOD_19_TAB_2DO_DES,
-
MOD_19_TAB_ANE_DES,
-
MOD_19_TAB_BAR_DES,
-
MOD_19_TAB_INT_COD)
-
values
-
(select
-
MOD_TAB_NUM_COD,
-
MOD_TAB_DES_NOR,
-
MOD_TAB_ESP_COD,
-
MOD_TAB_BAR_COD,
-
MOD_TAB_BAR_PRE,
-
MOD_TAB_REQ_DIA,
-
MOD_TAB_DIA_EST,
-
MOD_TAB_1ER_COD,
-
MOD_TAB_2DO_COD,
-
MOD_TAB_ANE_COD,
-
MOD_TAB_ESP_DES,
-
MOD_TAB_1ER_DES,
-
MOD_TAB_2DO_DES,
-
MOD_TAB_ANE_DES,
-
MOD_TAB_BAR_DES
-
from cli_tab_11_old);
Error on line 0
insert into cli_tab_19_old
(MOD_19_TAB_NUM_COD,
MOD_19_TAB_DES_NOR,
MOD_19_TA
ORA-00604: error occurred at recursive SQL level 1
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 8
ORA-00936: missing expression
***********************
hey i m a beginner,3 months work exp,still trying
i think ur query should b something like this
insert into test1
(fecha,momento,antes)
select
fecha,momento,some_column from prueba;
u wanna insert into 3 columns and providing 2 values,and "values' keyword also wont b used
regards,
lipsa
*************************
actually we've 2 kind of INSERT statement
1. INSERT INTO <table> [(field)] VALUES (<values>)
2. INSERT INTO <table> [field] SELECT [field] FROM <table>
when we use INSERT ... SELECT, we can simply insert rows selected from another table or tables, while INSERT ... VALUES insert from constant value.
Dear llunar,
plz check that ur 'MOD_19_TAB_INT_COD' column value(in the SELECT......) is not provided.and also dont use 'values' key word as masdi2t has already explained.
Regards
Lipsa :)
I want to insert records to the table test1 from table prueba, for example
insert into test1
(fecha,momento,antes)
values
(select
fecha,momento from prueba);
when i runinng this script i was recived the following errors
ORA-00604: error occurred at recursive SQL level 1
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 8
ORA-00936: missing expression
hai
have u checked u r table structure for column lengths.
because ora-00604 is an error that can be corrected if ora-06502 can be rectified.ora-06502 can be corrected if column data lengths are of suitable type.
usually this problem comes when u r trying to insert 10 charcters into a column whose data length is 5.
and ora-00936 is due to ur insert statement requires three columns for select stament where as u r select stament returns only two columns.and in insert from table type syntax the key word 'values' is not nessasary.
I want to insert records to the table test1 from table prueba, for example
insert into test1
(fecha,momento,antes)
values
(select
fecha,momento from prueba);
when i runinng this script i was recived the following errors
ORA-00604: error occurred at recursive SQL level 1
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 8
ORA-00936: missing expression
There are two problems from your insert statement:
1. You want to insert 3 values, but in select statement you are selecting only 2 values.
2. When you use a SELECT statement with INSERT statement, the key word VALUE should not be used.
Correct these and try executing a query. Do post back in case of any further problem!!
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Howard Hinnant |
last post by:
I recently asked for a survey of multimap insert with hint behavior, in
support of a paper I'm writing concerning lwg issue 233. My sincere
thanks to Beman Dawes, Raoul Gough, Russell Hind, Bronek...
|
by: Mark P |
last post by:
Some time ago I posted here about inserting into a set with a hint:
...
|
by: serge |
last post by:
I have a scenario where two tables are in a One-to-Many relationship
and I need to move the data from the Many table to the One table so
that it becomes a One-to-One relationship.
I need to...
|
by: Philip Boonzaaier |
last post by:
I want to be able to generate SQL statements that will go through a list of
data, effectively row by row, enquire on the database if this exists in the
selected table- If it exists, then the colums...
|
by: Carl |
last post by:
Hi,
I hope someone can share some of their professional advice and help me out
with my embarissing problem concerning an Access INSERT query. I have never
attempted to create a table with...
| |
by: Chris Kratz |
last post by:
Hello all,
We have run into what appears to be a problem with rules and subselects in
postgres 7.4.1. We have boiled it down to the following test case. If
anyone has any thoughts as to why...
|
by: Geoffrey KRETZ |
last post by:
Hello,
I'm wondering if the following behaviour is the correct one for
PostGreSQL (7.4 on UNIX).
I've a table temp_tab with 5 fields (f1,f2,f3,...),and I'm a launching
the following request :...
|
by: MP |
last post by:
Hi
Posted this several hours ago to another ng but it never showed up thought
i'd try here.
using vb6, ado, .mdb, jet4.0, no access
given table tblJob with field JobNumber text(10)
'The...
|
by: lenygold via DBMonster.com |
last post by:
Hi everybody:
What is the best way to
I have 10 tables with similar INSERT requiremnts.
INSERT INTO ACSB.VAATAFAE
WITH AA(AA_TIN, AA_FILE_SOURCE_CD, .AA_TIN_TYP) AS
( SELECT AA_TIN,...
|
by: EJO |
last post by:
with sql 2000 enterprise
Trying to build a stored procedure that will take the rows of a parent
table, insert them into another table as well as the rows from a child
table to insert into...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |