Querying SQL Server Data in Excel with a Parameter

  Рет қаралды 68,469

Dashboard Gear

Dashboard Gear

Күн бұрын

Пікірлер: 33
@byteseq
@byteseq 2 жыл бұрын
This is not really querying with a parameter, it's filtering AFTER querying
@davidchiles9640
@davidchiles9640 2 жыл бұрын
A VERY helpful video but unfortunately he is Preben is correct. I have SQL Profiled the output from this and in fact the main query is executed raw. ie. if you were to put a 3 year limit on it and the parameter was set for 1 year it would still return 3 years. then excel power query would filter that. not ideal imho. but also typical microsoft.
@sujaymessi
@sujaymessi 2 жыл бұрын
did you find a solution that filters while querying ? I am looking for one.
@byteseq
@byteseq 2 жыл бұрын
@@sujaymessi add your parameter to the SQL query instead
@sujaymessi
@sujaymessi 2 жыл бұрын
@@byteseq i tried that. It keeps giving an error that the parameter is part of the table.
@byteseq
@byteseq 2 жыл бұрын
@@sujaymessi you're doing something wrong then. I cannot guess what
@aamirghanchi9487
@aamirghanchi9487 2 жыл бұрын
Thanks for the video! IS it possible to call a stored procedure with parameters?
@haim.zara.ivanov.
@haim.zara.ivanov. 2 жыл бұрын
Very intrsting. Would you happen to post another video on how to connect parater to a cell ?
@JyroDante
@JyroDante 7 ай бұрын
kzbin.info/www/bejne/n2Kkf556a7iGeJY
@NyphronRising
@NyphronRising Жыл бұрын
yeah but what if you want to parameterize the sql query itself. like I have a SQL query SELECT * FROM ORDERS WHERE ORDERDATE=@ORDERDATE. I want to set the ORDERDATE from another cell in Excel. How does one do this?
@VishaalReddyKuthuru
@VishaalReddyKuthuru Жыл бұрын
I’ve been trying to figure this out too. No luck so far. Been getting error codes like “-C”
@coloradokid8321
@coloradokid8321 10 ай бұрын
Typical Microsoft! This used to be an easy thing to do in the older versions of Excel (prior to “Power Query”)!
@zj10
@zj10 9 ай бұрын
What if I have multiple rows of data that I want to search against the sql table? I would I go about this?
@physicsmostafa1774
@physicsmostafa1774 Жыл бұрын
what version of excel are you using?
@dashboardgear4256
@dashboardgear4256 Жыл бұрын
I am using Office 365
@brucetedder9166
@brucetedder9166 2 жыл бұрын
Hi Did you do the next video as I cannot find it?
@jameswyffels9414
@jameswyffels9414 2 жыл бұрын
Right? This isnt very helpful without the next piece. Where are you, Dashboard Gear?
@JustAGuyYaKnow42
@JustAGuyYaKnow42 3 жыл бұрын
Very helpful. A link to the next video in the series would be helpful. I'm looking how to call a stored procedure using these parameters.
@drewskavich
@drewskavich 3 жыл бұрын
It took some searching, but this is the next week's video: kzbin.info/www/bejne/q3nYZWCmeJKgnLc Unfortunately, he completely abandons what we did this week, and uses a different wizard to get in. I've looked for the following week, but can't find April 23. The next I see is April 30, and he's talking about Cubed Named Sets (based on title -- I haven't watched yet).
@djdrocco
@djdrocco 2 жыл бұрын
@@drewskavich I owe you a drink for saving me 5 minutes of searching :D
@ashokkumar-eb3dw
@ashokkumar-eb3dw 2 жыл бұрын
Querying SQL Server Data in Excel with a Parameter can you send me the next link
@brucetedder9166
@brucetedder9166 2 жыл бұрын
Yeah did you get the next link? Cant find his next video?
@alvaromdp
@alvaromdp 3 жыл бұрын
Hello, this is really helpfull. Sorry, where is the next video from this series? I need to connect the Parameter in Power Query to a cell in Excel. Thanks!
@dashboardgear4256
@dashboardgear4256 3 жыл бұрын
Glad you found this helpful! The next session on that topic will be in a few weeks.
@Maik1976ger
@Maik1976ger 3 жыл бұрын
@@dashboardgear4256 How many weeks? :-) I need the next step ;-)
@einyv
@einyv 3 жыл бұрын
Maybe this will help: 1.Excel Tab with the population 2.highlight column with list 3.Data menu choose from table /range 4.box comes Where is your table. mine is in column A with a header so I have in the formula =$A:$A and check my table has headers ok 5.Power query opens up, In my example Loan was my column name. To the left of the name it has a symbol for data type. It might have integers for loans so clock on the symbol to the left and change it to text 5a.. You will want to add column (custom) to pad the loan to ensure usability formal Text.PadStart([Loan],10,"0") --[Loan] is my column name] Then click remove rows in Reduce Rows option. Section to add like remove blanks, remove dupes. this piece saves the steps and will do them all on refresh 6.Name the table on right hand side properties 7.Close and Load. While i do this step i will delete the new tab it is loaded to since it is not needed, i want to make this a connection only. Deleting the tab will make it a connection only query 8.Go to get data and now we will get the query you will use for SQL, get from SQL server 9. Put in the server name, database, advance option to place your query 10. When the preview comes up click transform. 11.choose Merge queries and a merge box will come up. The query you have up already and now choose the population list whatever you called it. 12. click on the column to join the data. You might get a popup about privacy but click ignore since access is at the userid level anyway. Click save _ use the padded column 13. Join Kind, I choose right since the population list in the second. Click ok 14. You might have to expand the loanlist to see every record even when there is not a match (click the box with the left and right arrow in the name in the column name from the right join) 15. You will need to move the population list column which should be at the end to the first position If you are only passing a 1 parameter or a few different parameters with single values you can use step 1-5 to create each parameter list that will hold the single value. You click on manager parameters and add them there. You can also apply cleanup to the parameter if need be to account for formatting. You go to your query and on the column view where it shows your preview sample data click on the column you want to add a parameter, text field then choose the option. If you have a created parameter you can click the button to choose the parameter and save it and load it. You can use instead of sqlserver as your source choose get data from other sources and choose Microsoft query. Initially in the query put in a query with hard coded values to get it set up. once finished you can click on connections and right click the new connection and go to properties. click definitions in the command text where the code is, where ever you need the parameter put ([Fieldname]=? ) Parameters will go in order where they are in the code. ({fieldname is whatever you field is that you want to add the parameter to. once complete click on parameters, There you can add your parameters and where to find them.
@Kylian19
@Kylian19 Жыл бұрын
The problem i ve is that my data is so big it can't even be loaded to excell..
@BuckstarrZ
@BuckstarrZ Жыл бұрын
The title is misleading. You are not affecting the sql query at all, you are only filtering AFTER more data than necessary had been pulled already. I was expecting you showing how to use a parameter as part of the sql query itself.
@AntiThesis10125
@AntiThesis10125 4 ай бұрын
Filter not parameter
@Jahspecs1
@Jahspecs1 2 жыл бұрын
This is horrible! Are you really using macros? There are several other KZbin videos that show how todo this without using 1970s macros. Really? Macros?
Passing Parameter Values from Excel to SQL Server
21:47
Anthony Smoak
Рет қаралды 32 М.
ТВОИ РОДИТЕЛИ И ЧЕЛОВЕК ПАУК 😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 7 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 46 МЛН
How to Clean Data in Excel Power Query
41:39
Simon Sez IT
Рет қаралды 10 М.
Connect SQL Server from Excel and retrieve data
7:01
SQL with Manoj
Рет қаралды 166 М.
Power Query - Faster & Easier Parameters
13:38
BCTI
Рет қаралды 42 М.
Excel Power Query Parameter from a Cell Value (using a Named Range or a Table)
20:25
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 51 М.
Call a SQL Server Stored Procedure using Excel Parameters
13:26
Anthony Smoak
Рет қаралды 18 М.
How to Move Data Automatically Between Excel Files
11:37
Kenji Explains
Рет қаралды 212 М.
Using Cell Values to Drive Queries in Excel
9:52
Dashboard Gear
Рет қаралды 16 М.
Asmr makeup game #youtubeshorts
0:37
Asmr Makeup
Рет қаралды 9 МЛН
Cheerleader Transformation That Left Everyone Speechless! #shorts
0:27
Fabiosa Best Lifehacks
Рет қаралды 8 МЛН
Don’t Choose The Wrong Box 😱
0:41
Topper Guild
Рет қаралды 39 МЛН
I really didn't do it 😭
0:15
Little Hero Super Z - Official Channel
Рет қаралды 35 МЛН