Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot pass the File Name
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00421483
Message ID:
00421667
Vues:
12
><<<snip>>>
>>>Try this
>>>
>>>SET @sqlcmd = 'SELECT [@NumRecs] = COUNT(email)
>>>FROM ' + @TableName
>>>WHERE Include = 'Y'
>>
>>That certainly works Sergey. However, the PRINT @MyNumber line does not print a value. That means that the value (@NumRecs) was not returned to the calling program properly.
>

>I just try it on my SQL Server and it works.
>What version of SQL Server are you using?
>My is 7.0


I am running 7.0 also. The sql sequence (running from within)Query Analyzer:

DECLARE @MyNumber int
EXEC GetRecordCount "NASA", @NumRecs = @MyNumber OUTPUT
PRINT '================'
PRINT @MyNumber

returns the following:

@NumRecs
-----------
105729

(1 row(s) affected)

=================
<<<<<---- 105729 should print here.

Notice that PRINT @MyNumber returns no value.
Thanks for your help.
Aristotle
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform