Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning .T. or .F. from a Remote View on and Oracle db
Message
From
10/09/2004 16:40:23
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00941042
Message ID:
00941227
Views:
7
>>>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform