Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I Do Dynamic Query Construction in SQL Server SP
Message
De
15/10/2009 00:35:42
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:
01429454
Vues:
34
>>>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.

Thanks. I think I see your point. But I think I'll stand pat with this version because I really don't have any records with NULL last names and if there are any I can't use them anyway.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform