Groups | Blog | Home
all groups > sql server programming > february 2007 >

sql server programming : Exec Procedure Getdate()


Mike C#
2/10/2007 7:44:33 PM
You can retrieve GETDATE() from within the SP and not pass it as a parameter
at all.

[quoted text, click to view]

Erland Sommarskog
2/10/2007 11:50:59 PM
Taha (Taha105@hotmail.com) writes:
[quoted text, click to view]

DECLARE @now datetime
SELECT @now = getdate()
EXEC MyProcedure @now

You can only pass constants and variables as actual parameters in EXEC.
You cannot pass expressions.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
Taha
2/10/2007 11:58:38 PM
Hi All
Haw Can I Execute Procedure with Para Date like
Exec MyProcudre Getdate()
No Declare Need
Use Sql 2000 Sp3
Thanks


Taha
2/11/2007 3:03:50 AM
Thanks

[quoted text, click to view]

AddThis Social Bookmark Button