Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.11.5

Bug #5416 joinAdd(): AS definition causes error with Oracle
Submitted: 2005-09-15 15:20 UTC
From: roehr at zilleon dot com Assigned: alan_k
Status: Closed Package: DB_DataObject
PHP Version: Irrelevant OS: WInXP / Oracle 9.1
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 36 + 26 = ?

 
 [2005-09-15 15:20 UTC] roehr at zilleon dot com
Description: ------------ The AS keyword causes an error with Oracle when using aliases with joins. Please remove "AS" - it is not needed for MySQL either - or make the definition database-specific. I have seen bug #2319 but it causes the error even if the alias is not equal to the table name (see below). Thanks and best regards, Torsten Roehr Test script: --------------- SELECT * FROM synonym_material LEFT JOIN pharmacopoeia_mat_join_synonym AS pm_j_sm_1 ON pm_j_sm_1.synonym_material_id=synonym_material.synonym_material_id WHERE pm_j_sm_1.pharmacopoeia_material_id = 1 Line 2964: $fullJoinAs = "AS {$joinAs}"; Expected result: ---------------- $fullJoinAs = $joinAs; Actual result: -------------- $fullJoinAs = "AS {$joinAs}";

Comments

 [2005-09-16 01:38 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-09-16 08:40 UTC] roehr at zilleon dot com
Yes, this causes an error, too: select * from location as location2 ORA-00933: SQL command not properly ended "as" only seems to work for column aliases but not for table aliases with Oracle 9 - as far as I can tell. Thanks for replying so quickly, Alan.
 [2005-09-17 04:52 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!