Vote count: 0
sql = select (Select EMP.Projectname from DB1..EmpProj EMPRO ) As EMPROJ
(select SUM(EmpSal) EmpSal from (select SUM(I.Sal) EmpSal from '" + Projectname+ "'.dbo.SalInfo I where I.month_ID in (select MAX(I.month_ID) from '" + Projectname+ "'.dbo.SalInfo I) union all select SUM(OCA.ConvAmt) EmpSal from '" + Projectname+ "'.dbo.OSal OCA where OCA.monthId in (select MAX(OCA.monthId) from '" + Projectname+ "'.dbo.OSal OCA) ) As OCAmt
asked 16 secs ago
how to use table data as database name in sql
Aucun commentaire:
Enregistrer un commentaire