Bugs item #1684798, was opened at 2007-03-20 22:37
Message generated for change (Comment added) made by nielsnes
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1684798&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQL/Core
Group: SQL 2.16
Status: Open
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Romulo Goncalves (romulog)
Assigned to: Niels Nes (nielsnes)
Summary: LIKE clause

Initial Comment:
Dear developers,

The LIKE clause does not accept a string value from a colum, it only accepts 
direct strings.

Run the following example:

create table t1 (name varchar(1024), address varchar(1024), age int);

create table t2 (street varchar(1024), id int);

insert into t1 values('romulo', 'amsterdam', 23);

insert into t2 values('amsterdam', 1);

When I select using the LIKE clause and a string I get the correct result:
>select name from t1, t2 where t1.address LIKE 'amsterdam';
&1 0 1 1 1
% sys.t1 # table_name
% name # name
% varchar # type
% 6 # length
[ "romulo"      ]

However, when the value of a column is used the parser does not accept it:
>select name from t1, t2 where t1.address LIKE t2.street;
!syntax error, unexpected '.', expecting STRING in: "select name from t1, t2 
where t1.address like t2."


>select name from t1, t2 where t1.address LIKE street;
!syntax error, unexpected SCOLON, expecting STRING in: "select name from t1, t2 
where t1.address like street;"


Regards, 
Romulo

PS: Postgress accept it ;)

----------------------------------------------------------------------

>Comment By: Niels Nes (nielsnes)
Date: 2007-03-31 09:22

Message:
Logged In: YES 
user_id=43556
Originator: NO

Fixed parser. added test (which with some luck gives the correct output).
Leaving the bug open, as a correct handeling of the like-join is missing.

Test in src/tests/BugTracker/like_join.SF-1684798.sql 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1684798&group_id=56967

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to