>>>Hi, I have some remote views on an oracle db. Oracle does not support boolean types in it's tables so all the boolean data in those tables is encoded with a CHAR(1) containing either 'T' or 'F'.
>>>
>>>Is there anyway to have the remote views return .T. or .F. depending on the content of the field ?
>>>
>>>I first tried adding an expression with the view builder : iif(boolField, true, false) as boolField but it added this with " in the sql code so it did not work.
>>>
>>>I tried to create a view with such expressions by hands but the creation process does not work.
>>>
>>>TIA
>>
>>Try an expression like :
>>
>>myField = 'T'
>>
>>Cetin
>
>
>Thanks Cetin,
>but my problem is that I'm converting my VFP backend into a Oracle back-end and I'm looking for a way that my remote view would return me something that Fox could use instead of rewriting my application. So far I'm using a local view on my remote view but I'm pretty sure that there is a way to implements this String directly in my Remote view.
>
>Here is an example of the SQL of my views
>
>REMOTE
>SELECT bMyField FROM Table1
>(this is returning be 'T' or 'F')
>
>LOCAL
>SELECT IIF(bMyField = 'T', .T., .F.) FROM View1
>
>
>I would like to know if there is a way to implement the processing from my Local View into my Remote view
Before tableupdate :
lnNextModified = getnextmodified(0)
do while lnNextModified # 0
go m.lnNextModified
replace bMyField with transform(bMyLocal,'@Y')
lnNextModified = GetNextModified(m.lnNextModified)
enddo
PS: No need for an expression like:
IIF(bMyField = 'T', .T., .F.)
(bMyField = 'T') is sufficient.ie:
select (bMyField = 'T') as myBLocal, ....
Cetin