Hi i have to add dynamic params for {0}{1} but i dont know how that works. Can someone help me please and explain it to me?
string strCmdExclChainLast = string.Format("SELECT SUM(F9H.PCPQ9H) AS ValueLast " +
"FROM {3}.F9H00 F9H " +
"WHERE F9H.PCPU9H = " +
"(SELECT C02.YMDU02 " +
"FROM {3}.C0200 C02 " +
"WHERE C02.HTYC02 = '0' AND C02.YMDU02 < {0}{1}{2} " +
"ORDER BY C02.YMDU02 DESC " +
"FETCH FIRST ROW ONLY) " +
"AND F9H.LN1C9H NOT IN ('130', '211', '311', '360', '411', '530', '540')",
DateTime.Now.Year,
DateTime.Now.Month.ToString().Length == 1 ? "0" + DateTime.Now.Month.ToString() : DateTime.Now.Month.ToString(),
DateTime.Now.Day.ToString().Length == 1 ? "0" + DateTime.Now.Day.ToString() : DateTime.Now.Day.ToString(),
Program.Wavedlib);
dtExclChain.Rows[0]["ValueLast"] = DBOps.ExecDataTableDB2AS400(strCmdExclChainLast).Rows[0]["ValueLast"];