[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] (SQR 5528) ORACLE OCIBindByName error 1036 in cursor 4:



I see several things I would do differently:

begin-select  on-error=Wrap-Up

DeptId                      &deptid
ACCOUNT                     &account
sum(POSTED_TOTAL_AMT)       &total 
    Evaluate &Account
        When =   '299100'
            Let Amount_Array.YTD299100(#RowId) = &total
            Break  
        When =   '299110'
            Let Amount_Array.YTD299110(#RowId) = &total
            Break  
        When =   '299120'
            Let Amount_Array.YTD299120(#RowId) = &total
            Break 
        When =   '299130'
            Let Amount_Array.YTD299130(#RowId) = &total
            Break 
        When =   '299140'
            Let Amount_Array.YTD299140(#RowId) = &total
            Break
        When =   '299150'
            Let Amount_Array.YTD299150(#RowId) = &total
            Break 
        When-other
            Break 
    End-evaluate

FROM PS_ZGLT_PDRREF
where  Business_Unit = $Business_Unit_WK
       and DeptID =    $DeptID_WK
       and Account IN('299100','299110','299120','299130','299140','299150')
       and Accounting_Period between 0 and $Accounting_Month
group by  DeptID, Account

end-select

Where does your index get a value?

You're doing a lot of stuff you don't have to (the alias, assigning the columns 
to SQR variables) but you do have to treat a string (account) like a string and 
not a number.

Richard Knapp
Database Programmer/Analyst
Institutional Research and Planning
University of Missouri System
573-882-8856
knappr@umsystem.edu


-----Original Message-----
From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org]On
Behalf Of Savio J
Sent: Wednesday, February 04, 2004 11:36 AM
To: sqr-users@sqrug.org
Subject: [sqr-users] (SQR 5528) ORACLE OCIBindByName error 1036 in
cursor 4:


Hi All,

***(SQR 5528) ORACLE OCIBindByName error 1036 in
cursor 4: ***

New to SQR and have been getting this error that does
not make sense coz I tried everything within my
limited knowledge :)
... If anyone has an idea as to what may be causing
then pls let me know...Thx in advance...
(I have included the entire procedure here for better
explaining this)

Amount_Array is an array that has been defined in the
Set-up routine and #RowId is the index used....

begin-select  on-error=Wrap-Up

YTD.DeptId
   let $YTD_DeptID  =  &YTD.DEPTID
YTD.ACCOUNT
   let $YTD_account =  &YTD.ACCOUNT
sum(YTD.POSTED_TOTAL_AMT)
   let $YTD_posted_total_amt =  &YTD.POSTED_TOTAL_AMT


!* Load array YTD buckets for PeopleSoft Accounts *!

 Evaluate $YTD.Account

    When =   299100
    Let Amount_Array.YTD299100(#RowId) =
$YTD_posted_total_amt
        Break                 !exit The Evaluate
Statement
    When =   299110
    Let Amount_Array.YTD299110(#RowId) =
$YTD_posted_total_amt
        Break                 !exit The Evaluate
Statement
    When =   299120
    Let Amount_Array.YTD299120(#RowId) =
$YTD_posted_total_amt
        Break                 !exit The Evaluate
Statement
    When =   299130
    Let Amount_Array.YTD299130(#RowId) =
$YTD_posted_total_amt
        Break                 !exit The Evaluate
Statement
    When =   299140
    Let Amount_Array.YTD299140(#RowId) =
$YTD_posted_total_amt
        Break                 !exit The Evaluate
Statement
    When =   299150
    Let Amount_Array.YTD299150(#RowId) =
$YTD_posted_total_amt
        Break                 !exit The Evaluate
Statement
    When-other
        Break                 !exit The Evaluate
Statement

 End-evaluate

FROM PS_ZGLT_PDRREF  YTD
 where  YTD.Business_Unit = $Business_Unit_WK
        and YTD.DeptID =    $DeptID_WK
        and YTD.Account IN(299100, 299110, 299120,
299130, 299140, 299150)
        and YTD.Accounting_Period between 0 and
$Accounting_Month
group by  YTD.DeptID, YTD.Account

end-select


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users