Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

validating substrings

Status
Not open for further replies.
Aug 15, 2002
22
0
0
GB
I have a table that I scan barcodes into, this table shows the full character string of the barcode and it is then split, using a query. i.e.

aaa111y (barcode in a table)
would display
aaa 111 y (in the query)

however I need to be able to validate the first three characters of the string and ensure that no duplicates are processed i.e.

aaa111y
aaa111n

the above would throw out an error as the first 3 characters are duplicated in the same table (the same could be performed at query level I guess).

I am unsure how I would set this level of validation, any help or guidance would be appreciated.

Thanks

James
 
I would definitely add a field to your table, make it a unique index, and populate it with the results of the expression that builds the limited character string.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top