RE: [PHP-DB] R: [PHP-DB] Oracle SQL Problem
| From: | Jeroen ten Berge | Date: | Mon, 09 Oct 2000 07:46:03 +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-3422@lists.php.net to get a copy of this message | ||
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