Solved

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

Posted on 2013-01-23
1
896 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now