Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't drop temp table
Message
 
 
À
30/03/2005 15:57:53
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00999810
Message ID:
01000156
Vues:
35
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform