Procedure for inserting a record in HANA
Hi All
I have created a table using .hdbtable definition. I have also created an .xsodata service to fetch the details of the table. The problem is when trying to insert data into the table.
For this, I created a procedure. But when I tried to activate I am getting an error which says "Invalid column name".
But the Column name which is provided is correct.
I am stuck and not able to proceed. Please help.
Thanks in advance
Meenakshi
Hi All
Instead of using a procedure, I tried to achieve the same using server side js. I created a .xsjs file and tried to connect to DB to insert values. But here also no luck. There is an error popping in the insert statement.
Here is the screenshot of the problem. Any suggestions ?
Similar Messages
-
Need to create procedure for insert tax line into ra_interface_lines_all
Dear
I need to create a procedure for insert a tax line into ra_interface_lines_all against the line type "LINE".
after inserting the record i will run the auto invoice program to see the changes. kindly share how i can achieve through procedure.
scenario:-
after order dispatch workflow back ground run and data populated in ra_interface_lines_all where interface line id is null there i need to insert tax line against multiple orders.
I know the join. when line type = 'LINE' then tax line must have link_to_line_id of the line type line. my question is this when order number change how i can insert tax line against the line type line.
regards,
Fs
Message was edited by: 832296Dear
I need to create a procedure for insert a tax line into ra_interface_lines_all against the line type "LINE".
after inserting the record i will run the auto invoice program to see the changes. kindly share how i can achieve through procedure.
scenario:-
after order dispatch workflow back ground run and data populated in ra_interface_lines_all where interface line id is null there i need to insert tax line against multiple orders.
I know the join. when line type = 'LINE' then tax line must have link_to_line_id of the line type line. my question is this when order number change how i can insert tax line against the line type line.
regards,
Fs
Message was edited by: 832296 -
Start routine for insert a record by each day in a range of dates
Hi all,
I need create a start routine for insert 1 record by each day in a range of dates:
example:
Actual.
DATE_I DATE_F TIME_I TIME_F TIME_minutes
04/04/2008 05/04/2008 13:40:00 23:00:00 2000
Result:
DATE_I DATE_F TIME_I TIME_F TIME_minutes
04/04/2008 04/04/2008 13:40:00 24:00:00 X
05/04/2008 05/04/2008 00:00:00 23:00:00 Y
I thanks any help.
regards.
Alberto.Hi Alberto,
What I understood from your requirement is that you want to split the record into 2 since you have 2 dates coming from the source.
In the transformations you will have to create new rule group one for each of the dates.
You can create the new rule group by clicking on the 'Rule Group' button and then clicking on the 'New Rule Group'.
In the newly created rule groups take care to distribute data for each date separately.
Hope it is clear.
All the best...
Regards,
Krishna -
Procedure to insert same record for 30 times in a table using for loop
Hi,
I need to insert a record in a table which has to be iterated using for loopI think you are in the wrong forum. You can do that like this:
CREATE TABLE my_table (my_column NUMBER);
BEGIN
FOR i IN 1 .. 30
LOOP
INSERT INTO my_table
(my_column
VALUES (i
END LOOP;
END;
/Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.apress.com/9781430235125
http://apex.oracle.com/pls/apex/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
------------------------------------------------------------------- -
I have the follwing table is called master table contain the follwing fields,
So here i need to create three Stored procedures
1.Insert operations(1 o/p paramter,and 14 input paramters) - uspInsert
2.Update operations(1 o/p paramter,and 14 input paramters) - uspUpdate
3.Delete Operations(1 o/p paramter,and 14 input paramters)
- uspdelte
The following is the table ,so using this to make the three sp's ,Here we will use Exception machanism also.
Location
Client Name
Owner
ConfigItemID
ConfigItemName
DeploymentID
IncidentID
Package Name
Scope
Stage
Type
Start Date
End Date
Accountable
Comments
So can u pls help me out for this ,bcz i knew to stored procedure's creation.I have the follwing table is called master table contain the follwing fields,
So here i need to create three Stored procedures
1.Insert operations(1 o/p paramter,and 14 input paramters) - uspInsert
2.Update operations(1 o/p paramter,and 14 input paramters) - uspUpdate
3.Delete Operations(1 o/p paramter,and 14 input paramters) - uspdelte
The following is the table ,so using this to make the three sp's ,Here we will use Exception machanism also.
Location
Client Name
Owner
ConfigItemID
ConfigItemName
DeploymentID
IncidentID
Package Name
Scope
Stage
Type
Start Date
End Date
Accountable
Comments
So can u pls help me out for this ,bcz i knew to stored procedure's creation.
Why you have to pass 14 parameters for DELETE and UPDATE? Do you have any Primary Key? If you do NOT have primary key in your table then in case you have duplicate information, SQL will update both or delete them together. You need to provide DDL of
you table. What are the data types of fields?
Best Wishes, Arbi; Please vote if you find this posting was helpful or Mark it as answered. -
With the following insert script, data is inserted into the flight_instance table:
insert into flight_instance
select flight_no, 1, 1, 'AAL','06:25','CPH','07:10','DH4', 70, 0,'0:45', 148,
TO_DATE('20060101', 'YYYYMMDD')+ day - 1
from days, flight_frequency
where weekday = TO_CHAR(TO_DATE('20060101', 'YYYYMMDD') + day - 1, 'D')
and flight_no = 'LH6001'
and day <= 365;
This must be done for each flight and there are about 800 flights that have to be inserted or updated.
I need a procedure that will insert or update each record. Any ideas?
Thank you!Hi,
Is it a one time job / frequent job? Its good to use
Anonymous block if it is one time job.
Using cursor FOR LOOP as specified below
FOR loopindex in (select flight 800 flights) LOOP
Do update / Insert using each flight loopindex.flight
END LOOP
If inserted / updated rows are more than 10000, commit for every 10000 rows
I guess it may help you!
Thanks,
Sankar -
Stored Procedure for insert in a table
Hi everybody
I have to insert a line into a table to initialize the supply of a datawarehouse.
The table contains:
Id_chargement Oracle sequence
date_chargement sysdate
status 'EN COURS'
I read some message in this forum but I don't find the solution.
Can I call a procedure in the workflow ? Or must be use the preprocessing of the first map to call this stored procedure ?
But for the second solution, if I had a map before, I must change this call.So, it's not very interesting.
Have you a idea
Thank you for your help
Frederic from FranceHi Mahesh,
I created a procedure as
begin
insert into <table name> values( <timestamp value>);
end;
i added this procedure in the process flow, and as you said i added 1- Success, 2 - warning, 3 - error.
I am able to deploye the procedure and process flow,
after that when execute the process flow, that just says completed with errors,
no other information and oracle error messages are abilable in the
result panel
Job Final Status : Completed with errors
Job Processed Count : 1
Job Error Count : 0
Job Warning Count : 0
can you say , what could be the problem??
Thanks & regards
raja -
Procedure for Insert to BULK COLLECT
hi,
I have 2 questions-
1) Say I have below code. I want to call an insert procedure insead of INSERT INTO. If I do would it give any performance issue?
CREATE OR REPLACE PROCEDURE test_proc (p_array_size IN PLS_INTEGER DEFAULT 100)
IS
TYPE ARRAY IS TABLE OF all_objects%ROWTYPE;
l_data ARRAY;
CURSOR c IS SELECT * FROM all_objects;
BEGIN
OPEN c;
LOOP
FETCH c BULK COLLECT INTO l_data LIMIT p_array_size;
FORALL i IN 1..l_data.COUNT
INSERT INTO t1 VALUES l_data(i);
EXIT WHEN c%NOTFOUND;
END LOOP;
CLOSE c;
END test_proc;
CREATE OR REPLACE PROCEDURE insert_proc ( col1 table.col1%Type,
col2 table.col2%Type,
col20 table.col20%Type)
BEGIN
INSERT INTO HistoryTable (col1, col2, ...col20)
VALUES(val1, val2, ...val 20);
END;
END;
2) Is there any clean method to create insert procedure which has 20 columns which I can call in other proc to do bulk insert?It is good that you explained your requirements, but you did not give us some data to see with and work with.
If you could, help us with below details, it might be possible to help you:
1. Create table statements for your Tables (eg. Checking, Savings and history)
2. Insert Into statements for Sample data for your Tables.
3. validations that you need to perform
4. Expected output based on the Sample data provided in step 2.
Please do not forget to post your version number
select * from v$version;Also, use {noformat}{noformat} tags, before and after SQL Statements, Expected Output to preserve spaces and make the post more readable. -
Help: using a stored procedure to insert a record in DB
A stored procedure:
PROCEDURE db_insert
db_block IN OUT plsql_table)
is created in DB.
db_select and db_update are created too. They both work fine as
db_select is called by go_block execute_query (block populated) and
db_update is called by commit (DB updated);
I am trying to have db_insert called as:
1. DO_KEY('Create_Record');
2. fill in fields and then
3. commit.
These 3 steps do not cause the call of the auto generated block trigger insert_procedure. I think that after filling in the fields and there should be a way to call this insert_procedure trigger. I am not sure how this will work.
Any suggestions are greatly appreciated.I went through quite a deep search and yet not found any good answers. Knowing that select and update all done well with execute_query(stored procedure is called) and commit(stored procedure is called), but not insert.
Logically there must be some FORM build in that will trigger the call of stored procedure insert.
I am still looking for answers and just to remind that there are quite number of similar posts and I do not think that any clear answers were delivered.
Please help. -
Script for inserting 1000 record in a table...
Hello Gurus,
I have a table structure like this....
USERID USERNAME USERPWD EMAILID FIRSTNAME LASTNAME ISACTIVE
1 superuser Pyramid123 [email protected] a b 1
21 neha Pyramid123 [email protected] s s 1
I need to write a script where i can insert 1000 dummy related records into this table..
your help would be appreciated..
Thanks,
HPHi,
Hope the below solves your problem.
SQL> CREATE TABLE t (USERID NUMBER,
2 USERNAME VARCHAR2(20),
3 USERPWD VARCHAR2(10),
4 EMAILID VARCHAR2(20),
5 FIRSTNAME VARCHAR2(10),
6 LASTNAME VARCHAR2(10),
7 ISACTIVE NUMBER);
Table created
SQL> INSERT INTO t
2 SELECT srl,
3 name,
4 pwd,
5 LOWER(SUBSTR(name, 1, 10)) || '@abc.com',
6 SUBSTR(name, 1, 10),
7 SUBSTR(name, 11, 20),
8 1
9 FROM (
10 SELECT level srl,
11 dbms_random.string('U', 20) name,
12 dbms_random.string('A', 10) pwd
13 FROM DUAL
14 CONNECT BY LEVEL <= 1000);
1000 rows inserted
SQL> commit;
Commit complete
SQL> select count(1) from t;
COUNT(1)
1000
SQL> select * from t where rownum < 10;
USERID USERNAME USERPWD EMAILID FIRSTNAME LASTNAME ISACTIVE
342 JLMPNCRYRZYLEGVVKLQT ypsFEvtYOg [email protected] JLMPNCRYRZ YLEGVVKLQT 1
343 UINEJWHGFHCBOUXWQWEL OSBmpXSSDp [email protected] UINEJWHGFH CBOUXWQWEL 1
344 TLGFDHHLMACMMENWRMZG RIrPTdotaX [email protected] TLGFDHHLMA CMMENWRMZG 1
345 QARLMGJVFJXTJRQUFRFU lkbvEGACDi [email protected] QARLMGJVFJ XTJRQUFRFU 1
346 TYMDMPTWASFOGIYZYBZP SadCSlHiZc [email protected] TYMDMPTWAS FOGIYZYBZP 1
347 XDTRMJICNQNKFMDRRMZB lSchkFigpz [email protected] XDTRMJICNQ NKFMDRRMZB 1
348 DQZUKSXOLMQLMFBMEGNI psBCKgLVPP [email protected] DQZUKSXOLM QLMFBMEGNI 1
349 JMTNKXDDAPDHYLHUVSWF WXYrBQNKJk [email protected] JMTNKXDDAP DHYLHUVSWF 1
350 ZHAFZAJPJCBHNLTCQWTB rhtoGTpBle [email protected] ZHAFZAJPJC BHNLTCQWTB 1
9 rows selected
Regards
Ameya -
Task-flow for inserting a record in a popup: error on primary key.
Hi all,
I am using Jdeveloper 11.1.1.2.
I am trying to display a bounded task flow in a popup launched from a page. I am following the steps in: http://www.oracle.com/technology/products/jdev/tips/fnimphius/popupinuishell/declarative_popup_in_uishell.html
I have a view object (myVO) and I have a page (page1), where I can edit the records of myVO. In this page I have a button that launches (in a window) a task-flow (insertTF, that uses existing transaction if possible, composed by page2 and page3) where I can insert a new record in two step (using a train).
At the end of the train I can save or cancel (task flow return activity) the inserting record.
The button cancel work well, but the button save does not. When I click on it, I return in page1 but I have this error: Error: another user modified row with primary key oracle.jbo.Key [[+numberOfKey+]].
If I see the database navigator or I refresh the page, I can see the record just inserted.
How can I do to remove this error?
Thank you
Andrea
Edited by: Andrea9 on 10-dic-2009 06:39There are default values coming from the DB. There are also default values that I have setted in myModel on myEO.
I am the only user manages the database, there are no other users.
So, how can I solve this problem? Have I to remove the default value on inserting? From DB or from myEO?
thanks in advance
Andrea -
Using stored procedures for insert, update and delete
Hello all;
We have a question from our customer (who is the DBA), who has not in the past used TopLink, about whether it makes sense to tie TopLink into existing stored procedures to save and retrieve informations.
Is it possible?
Is there any circumstance under which it is a good idea?
ThanksIn TopLink any operation for which TopLink generates SQL, can be replaced by custom SQL, or a stored procedure call.
Custom SQL or stored procedures can be used for each of the descriptor's CRUD operations, but also for mapping queries and named queries. The Mapping Workbench only supports defining custom SQL for the descriptor CRUD operations and named queries, so many of the stored procedures call from the descriptor and mappings will need to be done through amendment methods.
Whether it makes sense or not depends on the application and the company and their requirements. It will add significant overhead to the development process to have to define and maintain all of the stored procedures, and the stored procedure calls in the descriptors. You may wish develop your application using TopLink generated SQL, and once you have the model and queries stabilized then switch to using stored procedures.
Whether it is a good idea depends on the application and the company and their requirements. Stored procedures may give the DBA more freedom to change the data-model once in production, and may allow for adding database-level security checks. In general using stored procedures will not improve performance if the procedures contain the same SQL that would have be executed anyway, but they may allow for the DBA to tune the SQL better. -
dear members,
i have a table with some missing numbers in a col1.
how can i add rows containing missing numbers.
starting and ending number is given in the procedure.
let us say starting from 1 to 10.
table
id col1
1 2
2 3
3 4
4 9
Required Result after running the procedure.
table
id col1
1 2
2 3
3 4
4 9
5 1
6 5
7 6
8 7
9 8
10 10
can i have that procedure.
regards
teefu.
Edited by: user_teefu on Aug 23, 2010 2:19 PMHi,
I would do something like that :create or replace procedure t_addrows(
p_min integer,
p_max integer)
as
l_inserted integer;
begin
insert into t (id, col1)
select
idstart+rownum id,
col1
from (
select idstart, p_min+level-1 as col1
from (
select nvl(max(id),0) idstart
from t
connect by level <= p_max-p_min+1
) n
where not exists (
select null
from t
where t.col1=n.col1
l_inserted := SQL%ROWCOUNT;
dbms_output.put_line('inserted : '||l_inserted);
end;
/It gets the max(id) from the table to generate "following" ids.
it uses the connect by level to generate integers between min and max parameters provided.
it does a NOT EXISTS to avoid primary key errors.
Example :Scott@my10g SQL>select * from t;
ID COL1
1 2
2 3
3 4
4 9
Scott@my10g SQL>begin
2 t_addrows(1,10);
3 end;
4 /
inserted : 6
PL/SQL procedure successfully completed.
Scott@my10g SQL>select * from t;
ID COL1
1 2
2 3
3 4
4 9
5 5
6 8
7 1
8 10
9 6
10 7
10 rows selected.
NB :_ I didn't include a COMMIT in the procedure. You decide wheither it should be there or not. -
I have doubt in inserting bulk records
hai good morning to all
my company having millions of records to insert into the DB ..
is there any program or tool to insert bulk records..
anyone plz help me..I don't think so, such tool available for inserting bulk records. What you can do is, write a PL/SQL programs to insert bulk records.
Search in the SQL and PL/SQL Forums for sample PL/SQL code who have already done, or check in asktom for such PL/SQL samples.
PL/SQL
http://asktom.oracle.com
Regards,
Sabdar Syed. -
Insert Multiple records using Database adapter with Stored procedure func
Hi All,
I want to insert multiple records on a database using a stored procedure. I wanted to insert those records using a Database Adapter and the Database adapter should be invoked by a Mediator.
Can somebody suggest me with ideas whether it can be acheived with OOB capabtilities in SOA suite or not?
Thanks for your help in advance.
Thanks,
ShivThe use case you want to achieve is feature supported by the DBAdapter and it is possible to invoke the same from mediator.
Please have a look at the oracle documentation and you should be able to get the necessary information.
The below links should help you as well:
http://download.oracle.com/docs/cd/E15523_01/integration.1111/e10231/adptr_db.htm
http://blogs.oracle.com/ajaysharma/2011/03/using_file_adapter_database_adapter_and_mediator_component_in_soa_11g.html
There are some video tutorials as well :)
http://www.youtube.com/watch?v=dFldS-fDx70 This should also help
Thanks,
Patrick
Maybe you are looking for
-
Which ipad air LTE should i buy from US to be used in Singapore
Any suggestions are welcomed. Thanks in advance. -ian-
-
I cant sync my ipad to my computer. How can i move ipad data, calendars and such, to another computer?
-
Hi, I want display graph for data in every group. Sometimes it is working correctly, but when I delete one parameter from graph, grap is not displayed. Every values is not null. Is possible that data is not grouped by SQL but group with reporter ? Ho
-
Hi all, we get this error aftter importing sapdba role according note 134592, all requirements according note 834917 are met. It works with ops$, with ORASID, but not for SIDADM ! brconnect -u / -f check works also Oracle Database 11g Enterprise Edi
-
Prime Infrastructure NCS Alarm Message: CPU: 85 crossed down threshold: 90
Dears, We have Cisco Prime NCS Ver.2.0 running on plad. Since yesterday the alarm give us severity major message (Message: CPU: 85 crossed down threshold: 90). Please advice what this problem and how to solve it. Thanks,