Parker Software Ltd Homepage
Forum Home Forum Home > Email2DB Email Parser > Scripting
  New Posts New Posts RSS Feed: SQL Integer Problem
  FAQ FAQ  Forum Search   Calendar   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
Posts: 1
Post Options Post Options   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
Posts: 1411
Post Options Post Options   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

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.078 seconds.
These are the forums for Parker Software, developers of Live Chat Software: WhosOn and Email Automation Software: Email2DB.