Multi-step query script in Toad [message #613821] |
Mon, 12 May 2014 14:25 |
|
ipisors
Messages: 24 Registered: May 2014 Location: USA [Arizona ... Desert]
|
Junior Member |
|
|
I want to do the following:
1. create a temp table
2. populate it with a select query
3. run a select statement from the temp table
I am using this method:
CREATE GLOBAL TEMPORARY TABLE tempSR
ON COMMIT PRESERVE ROWS
AS
Select ......
From ......
Where ......
Select * from tempSR
It seems like in Oracle, I must need some other wrappers to get this done. How is this done? I currently get "command not properly ended" on the last line. It works if I comment out the last line.
Sorry, I am very new to PL/SQL.
|
|
|
|
|
|
Re: Multi-step query script in Toad [message #613841 is a reply to message #613839] |
Mon, 12 May 2014 17:08 |
|
ipisors
Messages: 24 Registered: May 2014 Location: USA [Arizona ... Desert]
|
Junior Member |
|
|
Thank you, again. I believe I was very confused at first (you're right) because coming from Sql Server Mgmt Studio, there are really just two main distinctions:
1) selecting code and a-pressing button to execute, b-F5, or
2) not having any code selected, in which case, your cursor position matters not, and a-pressing button to execute, or b-F5, will parse & execute ALL code.
Now I can see that the actual state of things in Toad is a little bit more comparable to a Visual Basic module (in my mind), in that: It matters a lot where your cursor is...how you are executing it...and what wrapper (script) if any, is used.
Thanks gentlemen, I will also add this to my list of things to become more knowledgeable about.
|
|
|