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. ------------------------ 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/
