TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
baskaran chellasamy
NA
114
150.6k
Error in store procedure
Aug 23 2012 11:24 PM
Hi friends
The below is my stored procedure
create procedure sp_excelforgeneralholiday
as
declare @sql varchar(500)
set nocount on
begin
Set @sql =select * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=D:\baskarbook1.xls;HDR=YES;',
'SELECT * FROM [Sheet1$]')
exec (@sql)
end
The error is
Msg 156, Level 15, State 1, Procedure sp_excelforgeneralholiday, Line 11
Incorrect syntax near the keyword 'select'.
I dont which syntax error in my query.please help me
Reply
Answers (
3
)
Conversion failed when converting date and/or time from character string
sql procedure issue on second time