Hi Sherry,
If you have no records, it's because the where clause can't find any matches: check your tables/indexes. Also, your name field may cause a problem: if the first record returned is "Sir/Madam", then all remaining fields will be limited to the same length (9). So you may want:
iif(isnull(clients.name), PADR("Sir/Madam",LEN(clients.name)),clients.name) as name
> 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.
"It hit an iceberg and it sank. Get over it."
Robert Ballard, dicoverer of the Titanic wreckage.