Tilde variable in query HELP

Tilde variable in query HELP

Post by marlo.. » Fri, 31 Dec 1999 04:00:00




> In ObjectPal i'm using a query with a ~tilde variable.
> If i assign the varibale with something like this: var="John, H"
> the query result will be empty.
>the other responses are close, but no cigar.. the *whole* string must
>itself start and end with quotes (as if you typed it in that way) and
>the query processor will deal with the string as-is.. in this case:
>var = "\"John, H\""
>this is actually a common issue.. two state abbreviations are OR for
>Oregon and AS for American Samoa.. consider the problems querying for
>those values in a [State] field.. it's the exact same thing you are
>faced with..

Hello all,
Thanks very much for your response, it helped me on the right track.

In another case the variable itself comes from a table.
So when the user is interacting with the data through dialog
boxes the variable he choose will be stored in a table.

It's like this:    (paradox 7 for win95/NT)
empTC.open(Table)
Var1=empTC.Field
empTC.close

So Table contains the value of the variable (Var1) that actually must be
searched for in another table (Table2).

Query
Table2  |  Field2        |
        |  Check  ~Var1   |

The solution mentioned above won't work in this case.
I hope you can help me with this one
Thanks in advance,
Marlon

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Tilde variable in query HELP

Post by Ken Loom » Fri, 31 Dec 1999 04:00:00



>In another case the variable itself comes from a table.
>So when the user is interacting with the data through dialog
>boxes the variable he choose will be stored in a table.

>It's like this:    (paradox 7 for win95/NT)
>empTC.open(Table)
>Var1=empTC.Field
>empTC.close

>So Table contains the value of the variable (Var1) that actually must be
>searched for in another table (Table2).

>Query
>Table2  |  Field2        |
>        |  Check  ~Var1   |

Would you be better off using a TCursor into the second table.

Ken

 
 
 

Tilde variable in query HELP

Post by Steve Gree » Fri, 31 Dec 1999 04:00:00



> >var = "\"John, H\""

> In another case the variable itself comes from a table.
> So when the user is interacting with the data through dialog
> boxes the variable he choose will be stored in a table.

> Var1=empTC.Field

var1 = \" + empTC.Field + \"

--
Steve Green
Corel CTech - Paradox
Diamond Software Group, Inc.
Waldorf, Maryland  USA

http://www.diamondsg.com

 
 
 

Tilde variable in query HELP

Post by marlo.. » Fri, 31 Dec 1999 04:00:00


Quote:> empTC.open(Table)
> Var1=empTC.Field
> empTC.close

Var1= \" + empTC.Field + \"
won't work. It will only give me a syntax error.
I appreciate very much the response i got.
Thanks anyway.
I have been working myself for the past days on this problem and
i found a temporarily solution. I just want to share it:

Var1=Var

Var.breakApart(ar,",") ; breaks on comma's Only fiels incuding a comma
                         will be specially treated.
if ar.size()>1 then
   Var1=ar[1]
endif

Query
Table  | Field            |
       | Check ..~Var1..  |

Of course this is very inaccurate, but for some situation it may help.

Marlon

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Tilde variable in query HELP

Post by RPrenPho » Sat, 01 Jan 2000 04:00:00


Quote:>Var1= \" + empTC.Field + \"
>won't work. It will only give me a syntax error.

Should'nt that be:

Var1="\""+emptc.field+"\""

Query
Table  | Field            |
         | Check ..~Var1..  |

Randy Prentice

 
 
 

Tilde variable in query HELP

Post by marlo.. » Mon, 03 Jan 2000 04:00:00


Quote:

> Should'nt that be:

> Var1="\""+emptc.field+"\""

Many thanks Randy!!
Marlon

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

1. Using Tilde variable in query HELP

Hello everyone,
In ObjectPal i'm using a query with a ~tilde variable.
If i assign the varibale with something like this: var="John, H"
the query result will be empty.

Query
Table  |  Name          |
       |CheckPlus ~var  |

After some search i discovered that the comma will be seen as an
operator. That's why the query will have no result even if the name
"John, H" appears in the table.
Is there any workaround for this problem? i tried several thing, but no
result.
thanks in advance,
Marlon

Sent via Deja.com http://www.deja.com/
Before you buy.

2. NULL Issues

3. Help with query strings and tilde variables in PDOXWIN

4. Oracle 8.0.5 Client for Win98 download location

5. Tilde variable query advice?

6. PRESS RELEASE: Xceed Zip Compression Library released

7. ~Tilde Variables in Queries

8. Tilde variable & Query ReadFromFile

9. Query readFromFile and tilde variables

10. Date Tilde Variable in Query

11. Using Tilde (~) variable in query

12. tilde variable in a query