Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I Do Dynamic Query Construction in SQL Server SP
Message
 
 
À
14/10/2009 17:32:08
Bill Drew
Independent Consultant
Chicago, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
01428769
Message ID:
01429437
Vues:
35
>>If you have NULLs in any of your fields this query will return different result than
>>
>>                        SELECT * FROM case4 WHERE
>>                              (@LastSearch IS NULL OR patientlast LIKE @LastSearch+'%') AND
>>etc.
>So far my testing has given me what I'm looking for. Not planning on using OR logic. Is it the OR logic that you see as the problem?

Using OR logic is better because your current version will not return records with NULLs in them - unless it is intentional.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform