tag:blogger.com,1999:blog-6698210309262137433.post6131860004160738482..comments2023-05-24T08:05:11.298-04:00Comments on Code By Joshua the Lionhearted: Get data from a SQL Server Stored Procedure into Excel automaticallyJoshuahttp://www.blogger.com/profile/08903612467158866477noreply@blogger.comBlogger22125tag:blogger.com,1999:blog-6698210309262137433.post-35995396866176241732019-12-13T11:10:38.893-05:002019-12-13T11:10:38.893-05:00Hi Joshua,
How can this be distributed to busine...Hi Joshua, <br /><br />How can this be distributed to business users? I have created report using above bullets. When I send this report for testing connection through error. How this report can be distributed? I appreciate your help in advance. <br />Sapna saphttps://www.blogger.com/profile/06988725091696103904noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-75806884445624536192016-02-02T07:32:58.285-05:002016-02-02T07:32:58.285-05:00Very nice solution. Assuming I am restricted in m...Very nice solution. Assuming I am restricted in modifying the stored procedure called I want to take the output from above and join it with other information that I can get to. I want to treat the {call ....} as a results set and can't seem to manage it. Any more magic tricks you have would be greatly appreciated. --BillBill S.https://www.blogger.com/profile/04251839822526076679noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-41344697372457013942015-12-04T02:39:34.337-05:002015-12-04T02:39:34.337-05:00Dear Joshua
I get the Error Could not find th...Dear Joshua <br /><br /> I get the Error Could not find the store procedure............. pl help me out what shud i do next?????<br /><br /><br /> AtulAnonymoushttps://www.blogger.com/profile/15603616965801005142noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-74324774686708768342015-12-04T02:36:59.206-05:002015-12-04T02:36:59.206-05:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/15603616965801005142noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-31526969907666767132015-05-13T02:13:25.001-04:002015-05-13T02:13:25.001-04:00What should Id do to the ? section If I have no pa...What should Id do to the ? section If I have no parameters at all?<br /><br />Below are the necessary details -<br /><br />Database Name – ZZ_Common<br />SP Name – Update_VolDeep Davehttps://www.blogger.com/profile/09547403158818854333noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-24844777578182208322014-05-07T14:20:04.976-04:002014-05-07T14:20:04.976-04:00Never mind. It's because I checked on 'use...Never mind. It's because I checked on 'use this value/reference for future refreshes'.James Dickersonhttps://www.blogger.com/profile/11907748901371845950noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-71888988416124599212014-05-07T14:10:25.909-04:002014-05-07T14:10:25.909-04:00Thank you for this step-by-step tutorial. Immense...Thank you for this step-by-step tutorial. Immensely helpful.<br />This may seem really dumb but for the life of me I can't get Excel to prompt me for the parameters. Yes I chose the prompt option in step 11. I've tried hitting refresh in like 3 different places, edit query, connection properties etc. How do I get Excel to prompt me for the parameters?James Dickersonhttps://www.blogger.com/profile/11907748901371845950noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-72378810579422840172014-01-11T11:35:16.474-05:002014-01-11T11:35:16.474-05:00I am getting an error The database component of th...I am getting an error The database component of the object must be the name of the current databaseAnonymoushttps://www.blogger.com/profile/01495197089366270786noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-30761281373828804652013-10-01T22:59:09.950-04:002013-10-01T22:59:09.950-04:00I have the variable linked to a specified cell. I...I have the variable linked to a specified cell. Is there a way to pass a NULL value to the variable?<br /><br />This is my situation:<br />SELECT * FROM MyTable WHERE column = IsNull(@MyVariable , column)Dprincehttps://www.blogger.com/profile/14286216291015886711noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-2291350880796185712013-08-30T16:30:58.352-04:002013-08-30T16:30:58.352-04:00Harish,
It depends on how your procedure is using ...Harish,<br />It depends on how your procedure is using them. For example, do you combine them into a comma separated list used in an IN clause or do you treat them as a table in a JOIN or what exactly. Once we understand the procedure and how you use it when Excel is not involved we might be able to help.Joe Moylehttps://www.blogger.com/profile/07330102351247743541noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-5174161245229139442013-08-30T16:28:11.313-04:002013-08-30T16:28:11.313-04:00Ashok,
Try to rewrite the query without using a te...Ashok,<br />Try to rewrite the query without using a temp table. Attempt using a common table expression (CTE) if possible instead of a temp table or possibly a sub select.<br />JoeJoe Moylehttps://www.blogger.com/profile/07330102351247743541noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-30549449096851891962013-06-11T22:51:45.176-04:002013-06-11T22:51:45.176-04:00Hello,
I have a stored procedure that has 4 param...Hello,<br /><br />I have a stored procedure that has 4 parameters. But one of the parameters can have multiple values.<br />How do you pass multiple values to a single parameter?<br />I have 5 cells that have the values in them for the multi value parameter. These values can be changed by the user. I need to pass those values to the stored procedure (in one of the parameters). How can I do this please?<br /><br /><br />Harish Harryhttps://www.blogger.com/profile/13828613862545338073noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-56866794463332654652013-05-22T17:52:55.388-04:002013-05-22T17:52:55.388-04:00Ashok,
All you need to do is place the Select * in...Ashok,<br />All you need to do is place the Select * into the stored procedure you are calling. So at the very end of your SP, you will have something that looks like this:<br /><br />select *<br />from #table<br />endDanhttps://www.blogger.com/profile/09491592928394787697noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-6112921485893993752013-05-20T02:07:40.671-04:002013-05-20T02:07:40.671-04:00HI Joshua,
This is a great post. The solution is ...HI Joshua,<br /><br />This is a great post. The solution is perfectly working. I have one small problem after executing the procedure I need to use a select statement to pull the data from the table. The reason is the my stored procedure insert records to a temporary table. Since temporary table data can be pulled only on the same session I am not able to achieve pulling data to excel. Is there a way to give like<br />1. {call procedure(?,?)}<br />2. select * from table used in procedure.<br />If i split in two different queries data wont fetch.<br /><br />Kindly guide me how can I achive that.<br /><br />Thanks & Regards,<br />AshokAnonymoushttps://www.blogger.com/profile/11781647020102195576noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-43299622337378496332013-04-10T13:17:40.691-04:002013-04-10T13:17:40.691-04:00Thank you - this saved me time today when I needed...Thank you - this saved me time today when I needed to set it up. It's slightly different, but close enough in Excel 2010. :-)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-40068643927290919452013-01-25T13:53:08.878-05:002013-01-25T13:53:08.878-05:00Thanks a lot Joshua, you saved me a ton of time as...Thanks a lot Joshua, you saved me a ton of time as well. I can confirm it works properly on Office 2010.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-78383977066342945712013-01-19T10:39:57.679-05:002013-01-19T10:39:57.679-05:00Yes, I agree - your post is brilliant, I have spen...Yes, I agree - your post is brilliant, I have spent ages searching through other posts about writing VBA macros and all sorts of complicated stuff when I knew the answer had to be out there somewhere<br />Thankyou!<br />Pablo Diablohttps://www.blogger.com/profile/05643518961726016733noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-72333508749509454722013-01-11T15:10:34.926-05:002013-01-11T15:10:34.926-05:00Absolutely brilliant!Absolutely brilliant!Anonymoushttps://www.blogger.com/profile/09220219417175100154noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-66037933275621483352012-09-27T09:24:07.967-04:002012-09-27T09:24:07.967-04:00Does this still work correctly in Excel 2010?Does this still work correctly in Excel 2010?SomeJPHhttps://www.blogger.com/profile/10972470562812662824noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-11193182438811475742012-05-29T06:40:36.634-04:002012-05-29T06:40:36.634-04:00You have absolutely no idea how long I was looking...You have absolutely no idea how long I was looking for a how to on this...<br />Thanks a mil.<br />Just a small recommendation/change on step 8: don't simply close the query, but select the option to Return Data (the icon containing the open door with the arrow pointing toward it). Simply closing the query did not provide me with the Import data popup in point 9.SlashDhttps://www.blogger.com/profile/04060059601817888445noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-4707463744500025842012-02-29T12:38:14.137-05:002012-02-29T12:38:14.137-05:00great, thank you. Can you pass mutliple stored pro...great, thank you. Can you pass mutliple stored procedures or use a select statement after calling a stored procedure. for example,<br />{CALL northwind.dbo.spGetMaxCost (?, ?, ?)}<br /> select * from mytableomegadhttps://www.blogger.com/profile/07527806312017213636noreply@blogger.comtag:blogger.com,1999:blog-6698210309262137433.post-68941008537607689782012-01-20T18:56:01.937-05:002012-01-20T18:56:01.937-05:00Great! Save a ton of timeGreat! Save a ton of timeUnknownhttps://www.blogger.com/profile/10533185634474583735noreply@blogger.com