Home » SQL & PL/SQL » Client Tools » Update Statement
Update Statement [message #284145] Thu, 29 November 2007 00:47 Go to next message
yogeshyl
Messages: 50
Registered: October 2007
Location: Silvassa
Member
How could i use 5 or more update statements in a single sql query. I want to execute the query in toad8.5. What will be the separator?
Re: Update Statement [message #284146 is a reply to message #284145] Thu, 29 November 2007 00:51 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
How is this a "Networking and Gateways" question?
Isn't it a "SQL Client Tools" one? -> moved

Regards
Michel

[Updated on: Thu, 29 November 2007 00:51]

Report message to a moderator

Re: Update Statement [message #284168 is a reply to message #284146] Thu, 29 November 2007 01:34 Go to previous messageGo to next message
yogeshyl
Messages: 50
Registered: October 2007
Location: Silvassa
Member
Sorry I was actually new to this forum.
Re: Update Statement [message #284197 is a reply to message #284145] Thu, 29 November 2007 02:51 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
Quote:

What will be the separator?


A. semi-colons
But this will not be a single sql statement. It will be 5 sql statements separated by semi-colons(Wink
Re: Update Statement [message #284201 is a reply to message #284145] Thu, 29 November 2007 02:56 Go to previous messageGo to next message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

What do you want to update ? Different fields in the same table Or different tables ?

If Different fields in the same table you could do in same query almost . Other wise need to executes as 5 statments. In that case seperator will be ';' as suggested by 'Pablolee'

Thumbs Up
Rajuvan.
Re: Update Statement [message #284207 is a reply to message #284201] Thu, 29 November 2007 03:03 Go to previous messageGo to next message
yogeshyl
Messages: 50
Registered: October 2007
Location: Silvassa
Member
ok,Thanks.
Re: Update Statement [message #284209 is a reply to message #284197] Thu, 29 November 2007 03:06 Go to previous messageGo to next message
yogeshyl
Messages: 50
Registered: October 2007
Location: Silvassa
Member
Can i execute all the update statements separated by semicolon at a same time?
Re: Update Statement [message #284223 is a reply to message #284145] Thu, 29 November 2007 03:29 Go to previous messageGo to next message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

Yes... you can as in Attachment. You need to execute Run to cursor option as in attchment or from debug menu.

../fa/3494/0/

Thumbs Up
Rajuvan
Re: Update Statement [message #284226 is a reply to message #284145] Thu, 29 November 2007 03:33 Go to previous messageGo to next message
kir_ait
Messages: 198
Registered: November 2007
Location: Bangalore,India
Senior Member

Or select all statements and press F5.

Kiran.
Re: Update Statement [message #284232 is a reply to message #284226] Thu, 29 November 2007 03:41 Go to previous messageGo to next message
yogeshyl
Messages: 50
Registered: October 2007
Location: Silvassa
Member
Thanks Kiran. By pressing F5, i also come to know the line numbers on which my statements are wrong or if any syntax problems.

As i am very new to sql as well as oracle, i don't know such little things.

Re: Update Statement [message #284233 is a reply to message #284223] Thu, 29 November 2007 03:43 Go to previous messageGo to next message
yogeshyl
Messages: 50
Registered: October 2007
Location: Silvassa
Member
Thanks Rajuvan.
Re: Update Statement [message #284234 is a reply to message #284145] Thu, 29 November 2007 03:45 Go to previous messageGo to next message
kir_ait
Messages: 198
Registered: November 2007
Location: Bangalore,India
Senior Member

See, this nothing to do with SQL. It is toad feature. Thats all. You can read Toad Help manual for this by pressing F1. You can also know more short cuts there.

Cheers,
Kiran.

[Updated on: Thu, 29 November 2007 03:46]

Report message to a moderator

Re: Update Statement [message #284450 is a reply to message #284232] Thu, 29 November 2007 13:15 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
yogeshyl wrote on Thu, 29 November 2007 10:41

Thanks Kiran. By pressing F5, i also come to know the line numbers on which my statements are wrong or if any syntax problems.

As i am very new to sql as well as oracle, i don't know such little things.



If you are so new to Oracle, maybe you should focus on more important stuff than how to execute multiple statements with a single keystroke.
For starters, try to work with sqlplus instead of TOAD. GUI-tools are great and can improve productivity a great deal, but they hide so much from you that it takes away a big part of the things you need to really get an understanding of how (developing in) Oracle works.
Previous Topic: oracle log in problem while log ing in second time
Next Topic: problem with toad, ORA-04043, ORA-12638
Goto Forum:
  


Current Time: Sun Dec 04 10:14:25 CST 2016

Total time taken to generate the page: 0.04739 seconds