Skip to content

use of stringfunction in join condition of select statement results in error #124

@GoogleCodeExporter

Description

@GoogleCodeExporter
1. define statement "SELECT t1.c1, t2.c2 FROM t1 LEFT JOIN t2 ON (LEFT(t1.c2,6) 
= t2.c1)"

2. Subsequent parse and create will result in fatal error :
 "Uncaught exception 'UnableToCreateSQLException' with message 'unknown [expr_type] = function in "expression ref_clause" [0] ' in D:\ontwikkeling\www\SqlParser\src\builders\RefClauseBuilder.php on line 85"

What is the expected output? What do you see instead?
expected :
SELECT t1.c1, t2.c2 FROM t1 LEFT JOIN t2 ON (LEFT(t1.c2,6) = t2.c1)

What version of the product are you using? On what operating system?
version : 
I checked out the version after r1080.
OS : Windows XP


Please provide any additional information below.
Same result with substring function.
Without function it runs fine :
"SELECT t1.c1, t2.c2 FROM t1 LEFT JOIN t2 ON (t1.c2 = t2.c1)"

Original issue reported on code.google.com by Henk.Blo...@gmail.com on 21 Feb 2014 at 1:42

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions