Subject Re: [firebird-support] Part of string into JOIN statement
Author Dimitry Sibiryakov
On 11 Apr 2006 at 19:50, majstoru wrote:

>My problem is how to write SELECT statement which will cut first 4
>letters from id from STATUS table (Sample 1010001 -> 001) and join
>USERS table on STATUS table by this these 3 letters (Sample 001)

There is another trick besides SUBSTRING():

SELECT * FROM STATUS JOIN USERS ON STATUS.id LIKE '%'||USERS.id

--
SY, Dimitry Sibiryakov.