Home » Developer & Programmer » Forms » Insert with order by in forms
Insert with order by in forms [message #683457] Tue, 19 January 2021 14:25 Go to next message
compuscience
Messages: 94
Registered: September 2012
Member
I create oracle form
And need to insert values as select
But need to use this select with order by
But forms didn't run with it
Complication error
But without it the code ran but data not ordered
How can i do that

insert into table (column1,2)
select column3,coulmn4
from table
order by column3
Re: Insert with order by in forms [message #683458 is a reply to message #683457] Tue, 19 January 2021 14:51 Go to previous messageGo to next message
Michel Cadot
Messages: 67989
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Data are NOT ordered in the table anyway so ORDER BY is pointless.

Re: Insert with order by in forms [message #683459 is a reply to message #683457] Tue, 19 January 2021 14:53 Go to previous messageGo to next message
Michel Cadot
Messages: 67989
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

And why do you never feedback and answer our questions in your topics?

Re: Insert with order by in forms [message #683460 is a reply to message #683459] Tue, 19 January 2021 14:54 Go to previous messageGo to next message
Michel Cadot
Messages: 67989
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

And why do you never follow the rules giving your versions (Forms and Oracle rdbms) and formatting your posts?

Michel Cadot wrote on Wed, 11 November 2020 12:10

He took you 9 hours to answer the simple question about your version, wait a little bit .
In the meantime, review your previous topics, answer the question we posted and feed back in the other ones.

[Updated on: Tue, 19 January 2021 14:55]

Report message to a moderator

Re: Insert with order by in forms [message #683461 is a reply to message #683460] Tue, 19 January 2021 14:54 Go to previous messageGo to next message
Michel Cadot
Messages: 67989
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Please understand us.

Re: Insert with order by in forms [message #683462 is a reply to message #683461] Tue, 19 January 2021 15:43 Go to previous messageGo to next message
compuscience
Messages: 94
Registered: September 2012
Member
Really I'm so sorry for everyone
I have a big problem in my internet and pressure in my work

My forms version 6i
Re: Insert with order by in forms [message #683463 is a reply to message #683462] Tue, 19 January 2021 15:45 Go to previous messageGo to next message
compuscience
Messages: 94
Registered: September 2012
Member
Really I'm sorry
Re: Insert with order by in forms [message #683464 is a reply to message #683463] Tue, 19 January 2021 15:47 Go to previous messageGo to next message
compuscience
Messages: 94
Registered: September 2012
Member
But when i run this code in sql plus it's ok
But when do it in forms compiler refused
Re: Insert with order by in forms [message #683466 is a reply to message #683464] Wed, 20 January 2021 00:12 Go to previous messageGo to next message
Michel Cadot
Messages: 67989
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

And Forms compiler is right.

Re: Insert with order by in forms [message #683467 is a reply to message #683466] Wed, 20 January 2021 00:16 Go to previous messageGo to next message
compuscience
Messages: 94
Registered: September 2012
Member
i know
then what can i do to write this code
Re: Insert with order by in forms [message #683468 is a reply to message #683466] Wed, 20 January 2021 00:43 Go to previous messageGo to next message
Littlefoot
Messages: 21689
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
compuscience
But forms didn't run with it Complication error
That's probably because you made it complicated. As you were already told: insert rows without ORDER BY clause. Apply it to data block's "ORDER BY" property so that - when you fetch records from the database - they are sorted the way you want.
Re: Insert with order by in forms [message #683469 is a reply to message #683467] Wed, 20 January 2021 01:17 Go to previous messageGo to next message
Michel Cadot
Messages: 67989
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

compuscience wrote on Wed, 20 January 2021 07:16
i know
then what can i do to write this code

So you want to make it wrong?


Re: Insert with order by in forms [message #683480 is a reply to message #683469] Thu, 21 January 2021 07:12 Go to previous messageGo to next message
dancko
Messages: 101
Registered: June 2013
Location: italy
Senior Member
Order by clause work only for SELECT statement and is unique to the SELECT statement and is not used in other SQL statements like INSERT, UPDATE, DELETE and others.

[Updated on: Thu, 21 January 2021 07:13]

Report message to a moderator

Re: Insert with order by in forms [message #683494 is a reply to message #683457] Sun, 24 January 2021 13:23 Go to previous message
shahzaib_4vip@hotmail.com
Messages: 406
Registered: December 2008
Location: karachi
Senior Member
Dear Sir,

Do you need to insert multiple record at ones and you also need to insert it on sequence its that your question?

are you using Developer 6I ?

if yes then used upload system in oracle form with excel and in excel you sort your record what ever type you want. And if you want to know how to upload record with excel in developer 6I then reply i will send you sample fmb form to upload your record with excel

another way is to create a column in you table like serial no and insert serial number.

Hope you find your answer

Regards
Shahzaib
Previous Topic: Insert record
Next Topic: Form error
Goto Forum:
  


Current Time: Sat Oct 16 18:44:32 CDT 2021