Solved

Msg 102, Level 15, State 1, Procedure UpdateTxtFile, Line 2 Incorrect syntax near ')'.

Posted on 2013-01-23
1
914 Views
Last Modified: 2013-01-23
Dear Experts,
I am using below mentioned statement in a procedure to call attendance procedure, the error result is also here. Please guide me what I'm doing wrong.


Begin
Exec Attendance @cc, @cyear, @Dt, GetDate(), '00064'
End


Msg 102, Level 15, State 1, Procedure UpdateTxtFile, Line 2
Incorrect syntax near ')'.
0
Comment
Question by:Mehram
1 Comment
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 38813288
you cannot use GETDATE() directly as parameter
Begin
declare @d datetime
set @d = getdate()
Exec Attendance @cc, @cyear, @Dt, @d, '00064'
End 

Open in new window

0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question