Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL "into" works in Access but not Oracle 8i? 1

Status
Not open for further replies.

ftpdoo

Programmer
Aug 9, 2001
202
GB

Im doing the following SQL but the into statement is giving an error. Any ideas? The rest works fine.

==========================================================
SELECT CUSTOMERICE1A.PREMISE_ID, PREMISE.PREMISE_ID

INTO R4130_Temp

FROM CUSTOMERICE1A, PREMISE

WHERE CUSTOMERICE1A.PREMISE_ID = PREMISE.PREMISE_ID(+);
==========================================================

Thanks for any help / ideas! :)
Jonny
 

Im getting the error "Invalid SQL Statement" with the statement below:

INTO R4130_Temp

If I specifically name each field that im entering into I get the following error:

INTO R4130_Temp.Premise_ID, R4130_Temp.Premise_ID2

Produces the error "Missing Keyword"

Any suggestions? I know its something really simple! :O/

Jonny
 

The items in your "INTO" should be declared variables.
Code:
select sysdate into v_date from dual;

Are you trying to INSERT or UPDATE another table with this statement? Those are entirely different formats.

Beware of false knowledge; it is more dangerous than ignorance. ~George Bernard Shaw
Consultant Developer/Analyst Oracle, Forms, Reports & PL/SQL (Windows)
My website: Emu Products Plus
 

Im trying to do an INSERT from my select statement. In Microsoft Access I can run this query straigh off but Oracle isn't happy with it??

Any ideas? Been playing about with it for ages but it just won't run..

Thanks,
Jonny
 
If your goal is to insert those values into the table R4130_Temp, then you would need to use the following statement:

INSERT INTO R4130_Temp ( <field list> )
SELECT CUSTOMERICE1A.PREMISE_ID, PREMISE.PREMISE_ID
FROM CUSTOMERICE1A, PREMISE
WHERE CUSTOMERICE1A.PREMISE_ID = PREMISE.PREMISE_ID(+);

<field list> is the list of corresponding fields on R4130_Temp.
 
THANKS.. that appears to be running.. Theres millions of records but its def doing something! :O)

Jonny
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top