SQL 查询如何传参
单元格 A1 里是一个表格,我在单元格 A3 里使用 $select * from {A1.import@t()} where Material = ‘DC02C010C00’ 可以查询出图中所示想要的结果,但是对应的 Material 参数需要每次在 A3 单元格修改,我想每次直接把需要的参数填在 B1 单元格,然后通过 SQL 参数的办法生成想要的结果,会一直报错,求教应该怎么写,栓扣。
硬输入正常
使用参数报错
Material ModelName
DC02C010C00 SPRO9 14IRP8
DC02C010C00 YGPRO9 14IRP8
DC02C010C10 SPRO9 14IRP8
DC02C010C10 YGPRO9 14IRP8
DC30100S900 T15P_2_THOR
DC30100S900 T15P_3_THOR
DC30100S900 T15P_THOR
DC30100S900 X1FOLD_16_VALKYRIE
DC30100SA00 T15P_2_THOR
DC30100SA00 T15P_3_THOR
DC30100SA00 T15P_THOR
DC30100SA00 X1FOLD_16_VALKYRIE
DA30000R900 X12_CLAM_PANTHER
DA30000R900 X12_YOGA_JAGUAR
DA30000R900 X1C_11_PANTHER_IRL
DA30000R900 X1Y_8_JAGUAR_IRL
DA30000R910 X12_CLAM_PANTHER
DA30000R910 X12_YOGA_JAGUAR
DA30000R910 X1C_11_PANTHER_IRL
DA30000R910 X1Y_8_JAGUAR_IRL
DA30000R920 X12_CLAM_PANTHER
DA30000R920 X12_YOGA_JAGUAR
DA30000R920 X1C_11_PANTHER_IRL
DA30000R920 X1Y_8_JAGUAR_IRL
DA30000RA00 X12_CLAM_PANTHER
DA30000RA00 X12_YOGA_JAGUAR
DA30000RA10 X12_CLAM_PANTHER
DA30000RA10 X12_YOGA_JAGUAR
$select * from {A1.import@t()} where Material=?;B1