Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TableOne: LNAME FNAME FILETYPE
- Smith John A
- Jones Mary B
- Brown James B
- TableTwo: NAME FILETYPE
- Mary Smith 1
- Smith, Mary Jane 2
- Brown, James 3
- SELECT
- TableOne.LName, TableOne.FName, TableOne.FileType, TableTwo.Name
- WHERE
- (TableTwo.Name LIKE *LName* AND TableTwo.name LIKE *FName*)
- AND
- (IF TableOne FileType = 'A' THEN
- TableTwo.FileType = '1'
- ELSE IF TableOne FileType = 'B' THEN
- TableTwo.FileType = '2' OR TableTwo.FileType = '3'
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement