SQl Systax Error in My Excel
-
Thursday, June 21, 2012 12:52 PM
Hello,
I am new to Excel,
I am working on Excel when i open my Excel sheet getting this error " Run-time error '1004' Sql Syntax Error"
When i click on debug showing error on below line
"Selection.QueryTable.refresh BackgroundQuery:=False"
Previously its working fine but now i am getting this error.
Can you please tell me what could be the problem??
Thanks,
Diddi
All Replies
-
Thursday, June 21, 2012 2:41 PM
Check if your activecell is within Query Table boundary.If it is in normal range then error may occur.
---------------------------------------------------------------------------------------------
Please do not forget to click “Vote as Helpful” if any post helps you and mark as Answer if it solves the issue.
-
Thursday, June 21, 2012 3:31 PM
Is there any database problem?? bcoz prevously it worked but now it's not..
How to get the Sql query which they used for Excel.. how Can i get the path of sql query for excel data.. which database it used..
Can you please help me on this as i am new to Excel i dont know where database resides in Excel.
Thanks,
Diddi
-
Friday, June 22, 2012 5:47 AM
I am trying to just give a direction.
Excel's query table can extract from a database by SQL query.It will ask you for The database driver/provider and sql string etc.[Pls check offline help for deatails by pressing F1 in excel window)
Or programmatically you can use ADO for this purpose.Pls do a bit reasearch on it.I hope these two option can do what you wish.
- Marked As Answer by Rex ZhangModerator Thursday, June 28, 2012 4:25 AM

