Solved

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

Posted on 2013-01-23
1
924 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

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…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

687 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