2012 May 11 11:42 AM
Hi Experts,
Is there a way to insert a record into db table using a wa, at a specific index of the table.
I am adding a record to a db table. However the system adds it at the last. I want to add this record at third position from the start.
2012 May 11 11:50 AM
There is no way you can add a record at a particular index in DB.
The data can be sorted according to the key though.
2012 May 11 11:50 AM
There is no way you can add a record at a particular index in DB.
The data can be sorted according to the key though.
2012 May 11 11:57 AM
Hello Kirti,
To extend what Shambu has already mentioned - in a Relational DBMS there is no pre-defined sort order & consequently no first & last records!
The sorting can be done programmatically using ORDER BY(at DB level) or SORT command.
BR,
Suhas
2012 May 11 11:53 AM
Hi,
Check F1 hel og INSERT or select key fields first from table using index and then update that record using UPDATE or MODIFY statement.
Regards,
Prashant
2012 May 11 1:05 PM
Hi Kirti,
1. Read all the entries from DB Table.
2. Store the value in Internal Table.
3. Update the Internal Table by inserting ur value in wa table.
4. Insert all the values into the DB table.
But i think it will lead to performance issue.
Thanks.,
Dhivya.
2012 May 11 2:15 PM
Thank you all for prompt replies. However, I do agree with Shambhu. I couldn't find any way to insert at a specific index in DB table.
Prashant I tried F1 help however, not much use for my case.
Suhas, thanks but the orderby also wud not work here.
Dhivya, I cannot do so as I have to add a record in idoc table which wud lead to huge performance issues.
Thank you all.
2012 May 11 2:49 PM
I think there is room for misunderstanding here. If you would tell us more about your actual requirement, the involved DB table (EDID4?) and give a detailed example with data, then there might be a chance to help, e.g. by suggesting alternative ways.
Thomas