[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Help with input problem
> I'm trying to do a select with a value input by the user. I'm using:
> input $provider 'Please enter the provider number'
> This field is actually a character field, so I thought this would be
> okay, but nothing is being selected. When I hard code it in, as
> in'45700', it works fine. Any help would be appreciated.
>
> -Adem Hamidovic
> hamidoam@tuns.ca
Adem,
I'm assuming that you are trying to use $provider in a where clause.
begin-select
...
from
my_table
where
my_field = $provider
end-select
Some things to check:
1) What database are you using? If you're using Oracle and my_field
is char(5), then 45700 will match '45700', but 1234 will not match
'1234'. You may need to rpad.
2) is $provider being used in a local procedure (i.e., a procedure
that takes parameters)? If so, you may need to use $_provider
in your where clause:
where
my_field = $_provider
end-select
Hope this helps.
Ray
----------------------------------------------------------------------
Ray Ontko | Ray Ontko & Co | "Ask me about SQR and the WEB"
rayo@ontko.com | Richmond, In | See us at http://www.ontko.com/