![]() |
SQL Integer Problem |
Post Reply
|
| Author | |
pearshaped
New User
Joined: 27 Nov 2011 Posts: 1 |
Post Options
Quote Reply
Topic: SQL Integer ProblemPosted: 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? |
|
![]() |
|
Stephen
Admin Group
Joined: 21 Oct 2005 Location: Stoke on Trent Posts: 1389 |
Post Options
Quote Reply
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
|
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |