Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Syntax and Length Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00390293
Message ID:
00390304
Vues:
9
This message has been marked as the solution to the initial question of the thread.
>(like is a reserved word in the UT search engine?)
>
>
>cPerson has a value of 'DAVIDSON, RENEAE'.
>There is a column in my table called lastname, one of the rows has a value of 'DAVIDSON'.
>I have set exact off and set ansi off
>
>My SQL is
> select assoc_id , lastname from ;
> timeuser where lastname = cPerson
>
>I am having problems using the '%' an like and = operators because my target string is longer than the column value, so there is no match.
>
>?


Steve,

You'll have to extract last name from cPerson first and than use it in your select

cLastName = Trim(Left(cPerson, AT(",", cPerson) -1) )

select assoc_id , lastname from timeuser where lastname = cLastName

--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform