且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将一列SQL查询用于C#代码中的另一个SQL查询

更新时间:2022-12-12 12:09:17

朋友,

请使用此功能。希望这对你有所帮助。



string query1 = SELECT count(distinct DESC7)FROM ix_spc_planogram(NOLOCK)WHERE dbstatus = 1;

string query2 = SELECT count( distinctType)FROM Csg_Range_In_Store(NOLOCK)WHERE DisplayGroup IN('+ query1 +');



如果帮助回复必须谢谢......
Hi Friend,
Please use this. hope this will help to you.

string query1 = SELECT count (distinct DESC7) FROM ix_spc_planogram (NOLOCK) WHERE dbstatus= 1";
string query2 = SELECT count (distinct EquipmentType) FROM Csg_Range_In_Store (NOLOCK) WHERE DisplayGroup IN ('"+ query1+ "')";

If help reply must Thanks...