Select and Fetch Details

Paul Manning paulrmanning58 at icloud.com
Mon Oct 18 14:43:41 UTC 2021


Couple of things
The @ may not be evaluating properly as it is contained as part of a calculation and not sent directly to the $select.  You may have to use [eval(#S5)]
You could try casting the # variables in the calculation ie #1D0 
The trouble with these hash variables is they will retain the decimal places that were last used with it, so you need to set the decimal places each time they are used to be safe.


Paul

************************************************
Paul R. Manning
paulrmanning58 at icloud.com <mailto:paulrmanning58 at icloud.com>


> On Oct 18, 2021, at 10:31 AM, Das Goravani <goravanis at gmail.com> wrote:
> 
> 
> Hello List,
> 
> I’m having a hard time with a SELECT and FETCH.
> 
> This is the key code
> 
> Calculate #S5 as con(pwhereclause,' AND nrsn>=@[#1] AND nrsn<=@[#2]')
> Do lLoadList.$select([#S5]) Returns #F
> Do lLoadList.$fetch(500) Returns lFetchStatus
> 
> I should be getting zero records returned, or very few.
> 
> Instead I am getting 500 and they don’t match the search criteria.
> 
> It is as if my search is being ignored. By Search I mean my SELECT parameters.
> 
> The whole WHERE clause looks like this:
> 
> WHERE chcateg=0 AND nrsn>=1 and nrsn<=500
> 
> First, why is my search being ignored?
> 
> Second, if it was working, you only get back what matches the search criteria correct?  Like although I say “return 500 records” it will in fact only return 300 if that is all that matched the search, correct?
> 
> Thank you,
> 
> Das Goravani
> 
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list