Parameter Query Want to Enter Current Data for TeraData pull

ChristineRTP

New Member
Joined
Oct 29, 2009
Messages
12
This is the current Power Query code: With the data coming from another Power Query table (tblDateCurrent) with only one entry.

let
Source = Teradata.Database("cdwp", [HierarchicalNavigation=true, Query="SELECT #(lf) DIV_DESC,#(lf) DEPT_DESC,#(lf) SUB_DEPT_DESC,#(lf) COST_CNTR_NBR,#(lf) COST_CNTR_NM,#(lf) VERS_NM,#(lf) YEAR_NBR,#(lf) CAL_DT,#(lf) sum(FT_EMP_OR_HEAD_CNT),#(lf) RESRC_CLASS,#(lf) CAT_NM,#(lf) REPORT_DATE#(lf)FROM ENTR_OPRT_EXPNS_RPT.ACTL_BDGT_FRCST_FTEMP_HC_D#(lf)where report_date = [FONT=arial black](tblDateCurrent)[/FONT]#(lf)and div_desc = 'BCBS-Comm & Gov Services Ops'#(lf)group by 1,2,3,4,5,6,7,8,10,11,12#(lf)order by 1,2,4,10,11,12#(lf)"]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"REPORT_DATE", type date}, {"CAL_DT", type date}}),
#"Extracted Month Name" = Table.TransformColumns(#"Changed Type", {{"CAL_DT", each Date.MonthName(_), type text}}),
#"Split Column by Position" = Table.SplitColumn(#"Extracted Month Name", "CAL_DT", Splitter.SplitTextByPositions({0, 3}, false), {"CAL_DT.1", "CAL_DT.2"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Position",{{"CAL_DT.1", type text}, {"CAL_DT.2", type text}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type1",{"CAL_DT.2"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"CAL_DT.1", "Month"}})
in
#"Renamed Columns"

The TetaData code that results is below:
SELECT
DIV_DESC,
DEPT_DESC,
SUB_DEPT_DESC,
COST_CNTR_NBR,
COST_CNTR_NM,
VERS_NM,
YEAR_NBR,
CAL_DT,
sum(FT_EMP_OR_HEAD_CNT),
RESRC_CLASS,
CAT_NM,
REPORT_DATE
FROM ENTR_OPRT_EXPNS_RPT.ACTL_BDGT_FRCST_FTEMP_HC_D
where report_date = (tblDateCurrent)
and div_desc = 'BCBS-Comm & Gov Services Ops'
group by 1,2,3,4,5,6,7,8,10,11,12
order by 1,2,4,10,11,12

I want the teradata code to have the current data that is in the Power Query (tblDateCurrent). Any help with be greatly appreciated.

ChristineRTP
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,223,893
Messages
6,175,241
Members
452,622
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top