Check in the database with first 12 numbers...

In my database i have a column name BarCode and part Number Barcode is 12 digit when my user scan the barcode in textbox it gives them a partnumber related to that now what i want to do is scan a barcode that has 16 number as barcode but in the database it has first 12 digit same so basically i want to do is that check in my database only the first 12 numbers and dot check the last 4 number and give me the part number related to that...
so for example in my DATABSE I have Column Name BARCODE the content of that column is lets say 123456789123 and PART NUMBER IS A-1111. ok now my user will scan a barcode in a textbox the barcode user will scan is => 1234567891234567 so the first 12 digit is same as what i have in my database right? so any time if first 12 digit of what user scan match with what i have in my database the program will output the part number in this case A-1111.



  • you can use Left function to extract the first 12 characters and the check it from the database values

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion