[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: table alias in Select FROM List with :$tables ?
- Subject: Re: table alias in Select FROM List with :$tables ?
- From: Manoj Gurjar <mgurjar@HOTMAIL.COM>
- Date: Wed, 3 Nov 1999 09:21:44 EST
Hi Binh,
As someone alreadt explained before,
FROM [PS_JRNL_HEADER JH, PS_JRNL_LN JL:$HEADER_AND_LINE_REC]
Here JH, and JL aliases are used to help compile your
select statement, I mean to tell compiler that whatever
fields you selected in Select are of type in JH and JL table,
while tables list in $HEADER_AND_LINE_REC are the
actually table it should use to retrive rows.
Do display for $HEADER_AND_LINE_REC and u will see the
name of the actaul tables going to be used in Select, from
where rows are selected.
HTH,
Manoj
>From: "PHUNG, BINH" <BPHUNG@FINEHOST.COM>
>Reply-To: SQR-USERS@list.iex.net
>To: Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
>Subject: alias?
>Date: Tue, 2 Nov 1999 08:59:23 -0500
>
>Hello to everyone, New to this group thing.
>Hope someone can help explain to me what is the purpose of line 14.
>What is the point or idea behind having ":$HEADER_AND_LINE_REC" after the
>alias "JL"
>I just want to know what or how will it affect the program.
>
>Thank You in Advance.
>Binh
>
>
>1) let $Header_Rec = $Ledger_Rec_Header || ' JH'
>2) let $Line_Rec = $Ledger_Rec_Line || ' JL'
>3) let $Header_and_Line_Rec = $Header_Rec || ', ' || $Line_Rec
>
>4)begin-SELECT ON-ERROR=SQL-Error
>
>5)JL.JOURNAL_DATE
>6)JL.JOURNAL_ID
>7)JL.UNPOST_SEQ
>8)JL.JOURNAL_LINE
>9)JL.CURRENCY_CD
>10)JL.FOREIGN_CURRENCY
>11)JL.FOREIGN_AMOUNT
>12)JL.MONETARY_AMOUNT
>13)JL.MOVEMENT_FLAG
>
>14)FROM [PS_JRNL_HEADER JH, PS_JRNL_LN JL:$HEADER_AND_LINE_REC]
>15)WHERE JL.BUSINESS_UNIT = JH.BUSINESS_UNIT
>16) AND JL.JOURNAL_ID = JH.JOURNAL_ID
>17) AND JL.JOURNAL_DATE = JH.JOURNAL_DATE
>18) AND JL.UNPOST_SEQ = JH.UNPOST_SEQ
>
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com