Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL? :multiple operations in one SQL query to oracle

Re: SQL? :multiple operations in one SQL query to oracle

From: Telmo Silva <telmo_at_ica.net>
Date: 1997/07/08
Message-ID: <01bc8b5b$c307e2d0$bc127018@dimension>#1/1

James Mercer <jpmercer_at_concentric.net> wrote in article <01bc8833$b596cd80$7cd09bcf_at_jpmercer.concentric.net>...
> When I type something like:
>
> select * from table1; select * from table2
>
> from VB or in the Oracle ODBC test program, I get an invalid character
> error (I'm assuming on the ';'). How else could I send two selects in
 one
> SQL statement?
>

The way I do it:

DB.Execute "SELECT * FROM tablename1"
DB.Execute "SELECT * FROM tablename2"

However, if you are trying to do a join between two tables then the syntax is different. Look at VB help under SELECT with JOINS. eg/
SELECT fields
FROM table1 INNER JOIN table2
ON table1.field1 compopr table2.field1

Telmo Silva

-- 
_______________________________
Mail: telmo_at_ica.net
URL: http://www.ica.net/pages/telmo
Received on Tue Jul 08 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US