Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't drop temp table
Message
From
31/03/2005 09:18:24
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00999810
Message ID:
01000315
Views:
32
Wonderfull

Thank you
   In the future I will use the HTML tags.
   Thanks for the heads up!
>Jim,
>
>Try
DECLARE @WhereCond varchar(128)
>IF (@Book = '') OR (@Book IS NULL) OR (RTRIM(@Book) = 'ALL' )
>	SET @WhereCond = "%"
>ELSE
>	SET @WhereCond = RTRIM(@Book)
>
>SELECT *
>	INTO #ASTRA_BOOK
>	FROM #ASTRA_ALL
>	WHERE [Primary Reference] LIKE @WhereCond
>		AND ( (@startdate IS NULL)  OR (@startdate = '') or (DateColumn >=@startdate) )
>		AND ( (@enddate IS NULL) OR (@enddate = '') OR (DateColumn <= @endate) )
>
>
>Once more, please enclose code between < pre> and < /pre> (w/o spaces) tags because it preserves code formatting and makes it easier to read.
>
>
>
><snip>
Previous
Reply
Map
View

Click here to load this message in the networking platform