>Hi,
> Iam trying to extract certain fields from a table.
>Suppose I have a table with three fileds
>Shipper, Receiver and type
>
>My query should return rows with one column such that if
>type is 1, it should return flat string "TYPE 1", otherwise, it should return Receiver.
>Suppose my data is like
>
>"Shipper1", "Receiver1", 1
>"Shipper2", "Receiver2", 2
>"Shipper3", "Receiver3", 1
>
>And the query should return
>"TYPE 1"
>"Receiver2"
>"TYPE 1"
>
>How to write an sql query for this?
>
>Thanks
>Puri
Hi Puri,
your query should be like this:
Select IIf( Type = 1, "Type 1", Receiver ) As YourColumn From YourTable Into Cursor YourView
Sincerely
Petr Valach
Previous
Next
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