Using Tilde (~) variable in query

Using Tilde (~) variable in query

Post by Todd Spear » Tue, 11 Jul 1995 04:00:00



Has anyone had a problem using the tilde variable in a query?  I have a database field that has organization names in it such as:

Borland International, Inc.

The comma really messes up my query's search of the database and returns an empty answer table although I can see that there are
records out there that it should be hitting on.  

When I hard code the name of the organization I am searching for in a query, it works fine.  But when the ~ tries to pick up the
inputted organization the query finds nothing.

Thx in advance.

 
 
 

Using Tilde (~) variable in query

Post by Mathew Gyokers Eli » Tue, 11 Jul 1995 04:00:00


        What happens when you try quotes around the org name?

--
Paradox for Windows Consultant. Member: Borland Paradox Technical Support
            Web Page being relocated- want to provide space?

Borland supplied disclaimer: The services I provide via this message
and all consulting services I may provide are in no way associated with
or sponsored by Borland International or any of its subsidiaries.

 
 
 

Using Tilde (~) variable in query

Post by Paul Schop » Wed, 12 Jul 1995 04:00:00



>Has anyone had a problem using the tilde variable in a query?  I have a database field that has organization names in it such as:

>Borland International, Inc.

>The comma really messes up my query's search of the database and returns an empty answer table although I can see that there are
>records out there that it should be hitting on.  

>When I hard code the name of the organization I am searching for in a query, it works fine.  But when the ~ tries to pick up the
>inputted organization the query finds nothing.

>Thx in advance.

  I ust tried this out and have the same trouble.  If you ave a field
with a comma in it (lke the old familiar "LastName, FirstName") then
a pushbutton which has

var
 s string
endvar

s=Name.value
q = query
Table.db  |  Name  |
          |  check ~s |
endquery
q.executeQBE()

will not find anything if the Name field has a comma embedded.  
The trick is to do

 s = "\""+Name.value+"\""

before doing the query.  This adds quotes around the name before the
query string is created.

--
--------------------------------------------------------------------

  Coupled Climate Dynamics Group/971
  NASA Goddard Space Flicht Genter
  Greenbelt, MD

    if I had a .sig file it would day something witty here.

 
 
 

Using Tilde (~) variable in query

Post by Kuo-Sheng (Kas » Sat, 15 Jul 1995 04:00:00


: Has anyone had a problem using the tilde variable in a query?  I have a
: database field that has organization names in it such as:

: Borland International, Inc.

: The comma really messes up my query's search of the database and returns
: an empty answer table although I can see that there are : records out
: there that it should be hitting on.

: When I hard code the name of the organization I am searching for in a
: query, it works fine.  But when the ~ tries to pick up the : inputted
: organization the query finds nothing.

Use quotes around the strings by using "\"" before and after.

Or use querystrings.

--
=========================================================================
Kasey K. S. Chang (a guy)             | Paradox for Windows Programmer

URL> http://userwww.sfsu.edu/~kschang | X-COM Guru   General PC expert
--------------------------------------+----------------------------------
Editor of XCOM and XCOM2 UN-official Strategy Guide -- FREE!  (See URL)

 
 
 

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. Error 3757

3. using tilde variables in SQL VARIABLES

4. Announcement: I've joined Red Hat

5. Tilde variable query advice?

6. ? text file format i have seen?

7. ~Tilde Variables in Queries

8. sql question

9. Tilde variable in query HELP

10. Tilde variable & Query ReadFromFile

11. Query readFromFile and tilde variables

12. Date Tilde Variable in Query

13. Help with query strings and tilde variables in PDOXWIN