You can’t pass in a function call as an argument to your stored procedure. Instead use an intermediate variable:
DECLARE @tmp DATETIME
SET @tmp = GETDATE()
EXEC DisplayDate @tmp;
More Related Contents:
- SQL Server – error when creating stored procedure
- How can foreign key constraints be temporarily disabled using T-SQL?
- Pad a string with leading zeros so it’s 3 characters long in SQL Server 2008
- Does T-SQL have an aggregate function to concatenate strings? [duplicate]
- Datatype for storing ip address in SQL Server
- Is there a way to loop through a table variable in TSQL without using a cursor?
- Maximum size of a varchar(max) variable
- best way to convert and validate a date string
- How to get a date in YYYY-MM-DD format from a TSQL datetime field?
- How do I format a number with commas in T-SQL?
- How to set a default value for an existing column
- Need a datetime column in SQL Server that automatically updates when the record is modified
- Is there a way to simplify a NULL compare of 2 values
- TSQL Try / Catch within Transaction or vice versa?
- What is the maximum number of characters that nvarchar(MAX) will hold?
- How do I find a stored procedure containing ?
- TSQL: Create a view that accesses multiple databases
- Sequence as default value for a column
- Aggregate bitwise-OR in a subquery
- How do I flush the PRINT buffer in TSQL?
- Get ROWS as COLUMNS (SQL Server dynamic PIVOT query)
- OR Operator Short-circuit in SQL Server
- How to change default language for SQL Server?
- T-SQL incrementing counter based on change in a column value
- T-SQL XOR Operator
- ADO.NET calling T-SQL Stored Procedure causes a SqlTimeoutException
- @@ERROR and/or TRY – CATCH
- “If not exists” fails on SQL CE
- Does the `nodes()` method keep the document order?
- How to calculate difference in hours (decimal) between two dates in SQL Server?