[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Load Lookup
- Subject: Re: Load Lookup
- From: Arjan Hoornstra <ahoor@YAHOO.COM>
- Date: Thu, 11 May 2000 02:03:52 -0700
What type of dataserver do you use? It may be a
problem with the date format... in your error message
you ahve a sql statement which is send to the
dataserver. Have tried pasting this into an sql editor
and running it?
You need a more clear syntax error to solve this I
think, can't see anything wrong with it right now.
Maybe you can remove the alias ET ? And where does
the
ET.descshort in teh sql query come from?
Arjan
--- SANJAY PATIL <spatil@HVHS.ORG> wrote:
> Hi Guys,
>
> I have load lookup defined as below. It works fine
> if I have to get a
> return_value of single column,
> But if I have more than one column it errors out.
>
> Any suggestions for improvement
>
> LOAD LOOKUP CODE
>
> LET $LOAD_WHERE = 'ET.EFFDT <='
> LET $LOAD_WHERE = $LOAD_WHERE ||''''|| $AsOfDate ||
> '''' ||' AND
> ET.EFFDT = (SELECT
> MAX(EFFDT)
> FROM
> PS_EARNINGS_TBL'
> || '
> WHERE ERNCD = ET.ERNCD
> AND
> EFFDT <= '
> LET $LOAD_WHERE = $LOAD_WHERE ||''''|| $AsOfDate ||
> ''')'
>
> load-lookup name=EAR_NAME
> rows=500
> table='PS_EARNINGS_TBL ET'
> key=ET.ERNCD
> return_value=ET.DESCR
> where=$LOAD_where
>
>
> ERROR MESSAGES ********
>
> (SQR 1303) Error in SQL (perhaps missing &name after
> expression):
> select distinct ET.ERNCD, ET.DESCR ,ET.DESCRSHORT
> from PS_EARNINGS_TBL ET
> where ET.EFFDT <='2000-04-30' AND ET.EFFDT =
> (SELECT MAX(EFFDT) FROM
> PS_EARNINGS_TBL WHERE ERNCD = ET.ERNCD AND EFFDT
> <= '2000-04-30')
> (SQR 1304) Check SELECT columns, expressions and
> 'where' clause for syntax.
>
> SQR: Program Aborting.
__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/