eg cardnumber = 0987654321
try this one
Mid(cardnumber,7,4) will returns 4321
sas0riza <[EMAIL PROTECTED]> wrote:
Hi,
I want to take 2 inputs (email, number) and search for it in the
database. If I find the email, I then want to compare the "number"
(e.g. 1234) with the cardnumber associated with the email that was
found. Note that the cardnumber is of type char(10).
e.g. Table1 (holds all inputted data), Table2 (has a bunch of
records)
input (email) = [EMAIL PROTECTED]
input (number) = 1234
In Table2, [EMAIL PROTECTED] is found and cardnumber associated with
this email is 5440121234.
Now I want to compare the input number 1234 to the last 4-digits (or
last 4 char position) of cardnumber 5440121234. If it matches, then
I want to take cardnumber and insert it into Table1.
How would I go about doing so? charindex? or?
Please advise.
Thanks.
SPONSORED LINKS
Basic programming language Computer programming languages Programming languages
Java programming language The history of computer programming language
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "AspNetAnyQuestionIsOk" on the web.
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
---------------------------------
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/