Jaymond Flurrie
Well-known Member
- Joined
- Sep 22, 2008
- Messages
- 921
- Office Version
- 365
- Platform
- Windows
A simple named "ShipmentSource" Excel cell has a value.
I try to put it into a variable:
let shipmentsource = Excel.CurrentWorkbook(){[Name="ShipmentSource"]}[Content]{0},
I try to replace this kind of SQL lines
with the content of ShipmentSource named cell:
Result:
I could imagine this is very simple. And no, never before written a single line of PowerQuery code.
I try to put it into a variable:
let shipmentsource = Excel.CurrentWorkbook(){[Name="ShipmentSource"]}[Content]{0},
I try to replace this kind of SQL lines
SQL:
/* RFQ Round */
DECLARE @MyIntParameterValue int = 1
/* Shipment source */
DECLARE @ShipmentSource nvarchar(50) = 'ThisIsMyShipmentSource'
with the content of ShipmentSource named cell:
Power Query:
/* Shipment source */#(lf)DECLARE#(tab)#(tab)
@ShipmentSource nvarchar(50) = '" & shipmentsource & "'#(lf)#(lf)
Result:
Power Query:
Expression.Error: We cannot apply operator & to types Text and Record.
Details:
Operator=&
Left=/* MyIntParameterValue */
DECLARE @MyIntParameter int = 1
/* Shipment source */
DECLARE @ShipmentSource nvarchar(50) = '
Right=
Column1=ThisIsMyShipmentSource
I could imagine this is very simple. And no, never before written a single line of PowerQuery code.