General information
Category:
Coding, syntax & commands
>HELLO,
> What did I do wrong in the following statement it returns no record:
> select orders.id, iif(isnull
> (clients.name), "Sir/Madam",clients.name) as name ;
> from orders,clients ;
> where orders.id == clients.order_id ;
> into cursor temp
>what I am trying to do is if the order has a contact name I will print out the name otherwise just say "sir/madam". thanks.
>sherry
I'll chime in my 2 cents and let you determine how much it's really worth.
If you're getting no records returned the WHERE clause is not finding any matches. You are using == (exactly equal) as your comparison operator. Is it possible that ORDERS.ID and CLIENTS.ORDER_ID are both character but have different lengths???
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only