Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need Where Like '%' to include NULLS
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01370650
Message ID:
01370722
Vues:
17
This is what worked for me:

>Select *
> From Table Where @ProjFLIDSearch='%' OR Table.ProjFLID like @ProjFLIDSearch

Thanks to both of your help.

>>Here is my syntax:
>>
>>Declare @ProjFLIDSearch varchar(4),
>> @ProjFLID int
>>
>>Set @ProjFLID = 0
>>
>>if @ProjFLID = 0
>> begin
>> set @ProjFLIDSearch = '%'
>> end
>>else
>> begin
>> set @ProjFLIDSearch = @ProjFLID
>> end
>>
>>Select *
>>From Table Where Table.ProjFLID like @ProjFLIDSearch
>>
>>If @ProjFLID = 0 this will return all records , but will exclude NULL values that are in Table.ProjFLID
>>How do we include the null values.?
>>
>>if @ProjFLID > 0 then it should only bring back that record specified
>
>

>Select *
> From Table Where @ProjFLIDSearch='%' OR Table.ProjFLID like @ProjFLIDSearch
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform