Monday, March 12, 2012

Qualify customer information

Can anyone advise me of how to make sure that a customer is inputting
correct information into the database.
I am building a website, where customers are not logging in, but request
info. by name, addr. and postcode/city, email. I want to check if the
customer exists in the database or not.
Who has any knowledge of this i.e. validating customer name, addr. etc.
information. Which search technics in SQL Server should I make use of (i.e.
should I search exact match with addr. and name, or only with email, are
there any other searching technics to make use of ?).
Your post contains several broad questions which cannot be aptly answered
without more specifics. In general, when customer information is recorded in
a database uniquely, one can use a simple IF EXISTS() check to see if a
specific row exists in a table. For instance:
IF EXISTS ( SELECT * FROM tbl WHERE keycol = @.someval )
-- Data exists
ELSE
-- Data does not exist
Depending on what attributes ( like name, address, email etc. ) make up a
unique customer in your table, you may have to make use of a proper
predicate which can identify the row.
Anith

No comments:

Post a Comment