Parker Software Ltd Homepage
Forum Home Forum Home > ThinkAutomation Business Process Automation > Scripting
  New Posts New Posts RSS Feed - SQL Integer Problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SQL Integer Problem

 Post Reply Post Reply
Author
Message
pearshaped View Drop Down
New User
New User


Joined: 27 Nov 2011
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote pearshaped Quote  Post ReplyReply Direct Link To This Post Topic: SQL Integer Problem
    Posted: 27 Nov 2011 at 3:30pm
Have a problems with looking up a database;

Works with a txt lookup but when I try and use any  numbers (INT) i get the message:

Conversion failed when converting the varchar value "item_id" to data type Int

SQL :

Select * from stock where id =  '%item_id%'

Any help?
Back to Top
Stephen View Drop Down
Admin Group
Admin Group
Avatar

Joined: 21 Oct 2005
Location: Stoke on Trent
Points: 1454
Post Options Post Options   Thanks (0) Thanks(0)   Quote Stephen Quote  Post ReplyReply Direct Link To This Post Posted: 28 Nov 2011 at 8:52am
If its a numeric field then you don't put the field in quotes. e.g.:

SELECT * FROM stock WHERE id = %item_id%

Steve
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.05
Copyright ©2001-2016 Web Wiz Ltd.

This page was generated in 0.039 seconds.