Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: SQL
Miscellaneous
Thread ID:
00414860
Message ID:
00415050
Views:
19
>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
Map
View

Click here to load this message in the networking platform