Solved

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

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

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
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 an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

685 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