Subject | Re: [firebird-support] ------Urgent help needed (SKIP problem)---- |
---|---|
Author | Helen Borrie |
Post date | 2006-07-24T13:07:06Z |
At 09:42 PM 24/07/2006, you wrote:
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
>Why make life so complicated for yourself? Why not just this?
>
>
>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.
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