Bartender Query prompt

Posted on 2010-11-17
Last Modified: 2013-11-15
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
join pricing as p on = and p.pricepoint = b.pricepoint
where = ?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 = '2313958'  no problem.
The error message I get from the SQL is "Conversion failed when converting the varchar
value '.' to data type int
Question by:CamBal
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 11

Accepted Solution

N R earned 500 total points
ID: 34161533
Sounds like your passing invalid data then is ?queryprompt a variable?  Could it be passing data other than numbers?  That what it sounds like is happening.  Try the query below, that may work, otherwise you need to check your data that's being passed, there are text values within it.

select g.posdesc,g.labl,retail1, b.siz from garment as g
join barcode as b on
join pricing as p on = and p.pricepoint = b.pricepoint
where cast( as int) = cast(?QueryPrompt1 as int)

Author Comment

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

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
Healthcare organizations in the United States must adhere to the guidance of both the HIPAA (Health Insurance Portability and Accountability Act) and HITECH (Health Information Technology for Economic and Clinical Health Act) for securing and protec…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor ( Top Charts is a view in which you can set seve…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question