General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Network:
Windows 2000 Server
Thanks - works great!
>>SELECT invno, IIF(usesr2,salesrep2,'') FROM invpost
>>
>>The above select returns only the first character of the salesrep2 field. I think that is because the usesr2 is a Logical field. How can I return the full length of the salesrep2 field?
>>
>>Randy Wessels
>
>Within a SELECT statement, you should only use fixed-length expression, for example, iif(usesr2, salesrep2, space(10)) (assuming 10 is the length of the field), or padr(iif(usesr2, salesrep2, ''), 10)
>
>Otherwise, in your example, the first record that VFP encounters might very well be a record that does NOT fulfill the iif()-condition, so VFP decides that 1 character is enough to accomodate the result.
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