Link to home
Start Free TrialLog in
Avatar of CamBal
CamBal

asked on

Bartender Query prompt

Does anyone know how to pass from Bartenders queryprompt into the sql script.
select g.posdesc,g.labl,retail1, b.siz from garment as g
join barcode as b on b.style= g.style
join pricing as p on p.style = b.style and p.pricepoint = b.pricepoint
where g.style = ?QueryPrompt1
The ?Queryprompt is the holder name in the query software bartender supplies for
getting input from the user.  If I pass the data directly ie g.style = '2313958'  no problem.
The error message I get from the SQL is "Conversion failed when converting the varchar
value '.' to data type int
ASKER CERTIFIED SOLUTION
Avatar of Nathan Riley
Nathan Riley
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CamBal
CamBal

ASKER

Thanks.  You put me onto the right process.  the style is actually a varchar so I used "where g.style = cast(?QueryPrompt1 as varchar) and all works.  Much appreciated. :-)