Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't drop temp table
Message
 
 
To
30/03/2005 15:57:53
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00999810
Message ID:
01000156
Views:
34
This message has been marked as the solution to the initial question of the thread.
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>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform