string sqlQueryString = " SELECT g.code AS GoodCode, g.name AS GoodName, " +
"msr.name AS MsrName, sm.min_quan AS KolMin, sm.max_quan AS KolMax, " +
"sm.quan AS KolNal, ord.prc AS EdPrice, s.name AS Sklad, m.name AS Mol, " +
"k.code AS KodDost, k.name AS NameDost " +
"FROM N_GOODS_{0} AS g INNER JOIN " +
"G_SMGS_{0} AS sm ON g.id = sm.good_id INNER JOIN " +
"N_KNTRS_{0} AS k ON g.id = k.id INNER JOIN " +
"N_PRC_LISTS_{0} AS pr ON g.id = pr.id INNER JOIN " +
"G_ORDD_{0} AS ord ON sm.smg_id = ord.smg_id INNER JOIN " +
"N_MOLS_{0} AS m ON sm.mol_id = m.id INNER JOIN " +
"N_STORS_{0} AS s ON sm.stor_id = s.id INNER JOIN " +
"N_MSRS_{0} AS msr ON g.id = m.id";
sqlQueryString = String.Format(sqlQueryString, dbLink.CurrentFirm.Id);
return " ( " + sqlQueryString + " ) AS t";
这是一个 sql 查询的字符串,我正在尝试在一段 c# 代码中执行此操作。然而,我花了一整天的时间试图让它发挥作用。这是我得到的错误:
关键字“FROM”附近的语法不正确。 关键字“AS”附近的语法不正确。