RE: [PHP-DB] R: [PHP-DB] Oracle SQL Problem

From: Date: Mon, 09 Oct 2000 14:43:17 +0000
Subject: RE: [PHP-DB] R: [PHP-DB] Oracle SQL Problem
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-3435@lists.php.net to get a copy of this message
So in native mode there's no problem ,but with openlink there is... I don't know open link's ODBC, but maybe there are some faulty settings in the open link config files... -----Original Message----- From: Old Keung [mailto:wlskspam@usa.net] Sent: Monday, October 09, 2000 4:36 PM To: php-db@lists.php.net Subject: Re: [PHP-DB] R: [PHP-DB] Oracle SQL Problem I have tried that. The sql is much longer but still doesn't work. Today I compile the php with oci8 option. Both UNION and sub-query works. But it seems that it is less stable. We prefer to use openlink odbc to connect to Oracle instead of using the API call. ""Jeroen ten Berge"" <j.ten.berge@getexo.nl> ????? news:NDBBIEFFBBEFHIFIMHHPIEOBCLAA.j.ten.berge@getexo.nl... > You could try to put the table name in front of the column name like this : > SQL 1: > SELECT tb01.name as name FROM owner.tb01 > UNION ALL > SELECT tb02.name as name FROM owner.tb02 > > SQL 2: > SELECT tb01.name > FROM owner.tb01 > WHERE tb01.name IN > (SELECT tb02.name FROM owner.tb02) > > If I query mssql7 databases I always have to put the owner in fron of the > table name, the tablename in front of the column is just what access > generates so it's just a guess if that would help... > > L8r, > Jeroen. > > > -----Original Message----- > From: Roberto Sartor [mailto:roberto@mionetto.it] > Sent: Monday, October 09, 2000 9:32 AM > To: 'Old Keung'; php-db@lists.php.net > Subject: [PHP-DB] R: [PHP-DB] Oracle SQL Problem > > > Were your queries in UPPERCASE chars? > > Ciao > Roberto > > > > -----Messaggio originale----- > > Da: Old Keung [mailto:wlskspam@usa.net] > > Inviato: domenica 8 ottobre 2000 3.54 > > A: php-db@lists.php.net > > Oggetto: [PHP-DB] Oracle SQL Problem > > > > > > Hello All, > > > > I try to execute the following SQLs from php: > > > > SQL 1: > > SELECT name FROM tb01 > > UNION ALL > > SELECT name FROM tb02 > > > > SQL 2: > > SELECT name > > FROM tb01 > > WHERE name IN ( > > SELECT name FROM tb02 > > ) > > > > The result is "Invalid Column Name" for each SQL statement. > > > > I am using php4, Oracle and openlink. I have tested the above > > statement in > > Oracle sqlplus and they work. But when I execute exactly the > > same sentence, > > it doesn't work. > > > > Could anyone point out where is the problem? Does the > > openlink has different > > syntax for the SQL statement? > > > > Thanks in advance. > > > > William > > > > > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > > For additional commands, e-mail: php-db-help@lists.php.net > > To contact the list administrators, e-mail: > > php-list-admin@lists.php.net > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#3435) next »