Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to load a table with just records that have the ProductName ‘Jacuzzi’ and another table with just records that have the ProductName ‘Wine Glass’.
All table data is coming from the same source but the second table (Tbl2) will not load and its syntax coloring indicates a problem. I intend to drop both tables after the load is finished can you help?
Tbl1:
LOAD
"CategoryID",
"ProductID",
"QuantityPerUnit",
"SupplierID",
"ItemCost",
"ItemPrice",
"UnitsInStock",
"UnitsOnOrder",
"UnitCost",
"CurrentPrice",
"ProductName",
FROM [lib://SOP.xlsx]
(ooxml, embedded labels, table is [Products]);
If(WildMatch([ProductName],'*Jacuzzi*')
Tbl2:
LOAD
"CategoryID",
"ProductID",
"QuantityPerUnit",
"SupplierID",
"ItemCost",
"ItemPrice",
"UnitsInStock",
"UnitsOnOrder",
"UnitCost",
"CurrentPrice",
"ProductName",
FROM [lib://SOP.xlsx]
(ooxml, embedded labels, table is [Products]);
If(WildMatch([ProductName],'*Wine Glass*')
Yes, the NoConcatenate should look like you have coded it.
I don't see what the syntax error may be on your WildMatch(). It looks correct to me.
-Rob
First, Tbl2 will not create a seperate table. It will be automatically concatenated to Tbl1 because the Feld list is the same. If you separate tables, add the NoConcatenate keyword before LOAD in the Tbl2 load.
Your filtering statement is incorrect. It should be a "where" clause and is part of the load statement (before the semicolon)
FROM [lib://SOP.xlsx]
(ooxml, embedded labels, table is [Products])
where WildMatch([ProductName],'*Wine Glass*');
-Rob
Thank you Rob, I used the code below as recommended however WildMatch turned red for Tbl1 and Tbl2 which I think that means there is a problem. What do you think?
FROM [lib://SOP.xlsx]
(ooxml, embedded labels, table is [Products])
where WildMatch([ProductName],'*Wine Glass*');
Great tip about NoConcatenate it should look like this?
Tbl2:
NoConcatenate
LOAD
Yes, the NoConcatenate should look like you have coded it.
I don't see what the syntax error may be on your WildMatch(). It looks correct to me.
-Rob