Solved

Bartender Query prompt

Posted on 2010-11-17
2
4,378 Views
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 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
0
Comment
Question by:CamBal
[X]
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
2 Comments
 
LVL 11

Accepted Solution

by:
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 b.style= g.style
join pricing as p on p.style = b.style and p.pricepoint = b.pricepoint
where cast(g.style as int) = cast(?QueryPrompt1 as int)
0
 

Author Comment

by:CamBal
ID: 34167076
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. :-)
0

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 (https://www.adremsoft.com/). 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