I have a standard SELECT SQL statement in which one of the items in the table is a field called Owner. The owner field can either be an id number that points off to another table called users -OR- it coule be a persons name, email address.
Now what I need to return in a single query is the Owner's Name in one field and the Owner's Email address in a second.
Is there a way to do a conditional
if Owner is numeric
pull owner name from users AS OwnerName
pull owner email from users AS OwnerEmail
else
first item in Onwer AS OwnerName
second item in Owner AS OwnerEmail
end
?????
Any help would be appreciated - thanks!
-- Jeff
Now what I need to return in a single query is the Owner's Name in one field and the Owner's Email address in a second.
Is there a way to do a conditional
if Owner is numeric
pull owner name from users AS OwnerName
pull owner email from users AS OwnerEmail
else
first item in Onwer AS OwnerName
second item in Owner AS OwnerEmail
end
?????
Any help would be appreciated - thanks!
-- Jeff