Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need Where Like '%' to include NULLS
Message
From
02/01/2009 12:40:03
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01370650
Message ID:
01370719
Views:
19
This message has been marked as the solution to the initial question of the thread.
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform