Solved

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

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Where clause in stored procedure 8 50
ms sql + top 1 for each customer 3 44
Truncate vs Delete 63 102
How can I exclude some wording in a like statement? 39 67
I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

863 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

26 Experts available now in Live!

Get 1:1 Help Now