Subject Re: [firebird-support] ------Urgent help needed (SKIP problem)----
Author Helen Borrie
At 09:42 PM 24/07/2006, you wrote:
>
>
>
>select
>BASIC.USR_ID,BASIC.USR_PWD,BASIC.USR_NAME,BASIC.ROLE_ID,BASIC.USR_CODE,E
>XTENSIN.PROPERTY_NAME,EXTENSIN.PROPERTY_VALUE
>from USR_BASIC_INFO BASIC LEFT OUTER JOIN USR_EXTENSION_INFO EXTENSIN ON
>BASIC.USR_ID=EXTENSIN.USR_ID
>WHERE BASIC.USR_ID in ( select first 1 skip 0 usr_id from
>usr_basic_info)
>
>
>
>Pupose --> Select the first 'N" rows of the usr_basic_info and then
>apply the left outer join with usr_extension_info
>
>The clause [WHERE BASIC.USR_ID in ( select first 1 skip 0 usr_id from
>usr_basic_info)] works if the [FIRST n SKIP m] clause is removed.

Why make life so complicated for yourself? Why not just this?

select FIRST 1
BASIC.USR_ID,
BASIC.USR_PWD,
BASIC.USR_NAME,
BASIC.ROLE_ID,
BASIC.USR_CODE,
EXTENSIN.PROPERTY_NAME,
EXTENSIN.PROPERTY_VALUE
from USR_BASIC_INFO BASIC
LEFT OUTER JOIN USR_EXTENSION_INFO EXTENSIN
ON BASIC.USR_ID=EXTENSIN.USR_ID

./heLen