S
scsusan
Guest
Anyone know how to convert this SQL statement from Access to MS SQL? I have searched the web for answers but is still unable to come up with a solution.
SELECT SUM([WI].[Weight]) AS TotalWeight, SUM([WI].[WI]) AS TotalWI, Round(TotalWI/TotalWeight,1) AS [Index]
FROM WI
WHERE [WI].[L1]=1 And [WI].[L2]=1 And [WI].[L3]=1;
I intend to create a view in MS SQL with the MS Access SELECT statement like this.
CREATE VIEW KC AS
SELECT SUM([WI].[Weight]) AS TotalWeight, SUM([WI].[WI]) AS TotalWI, Round(TotalWI/TotalWeight,1) AS [Index]
FROM WI
WHERE [WI].[L1]=1 And [WI].[L2]=1 And [WI].[L3]=1
It gives me the Invalid Column Error.
Thanks. Any help will be greatly appreciated.
Regards,
Susan
SELECT SUM([WI].[Weight]) AS TotalWeight, SUM([WI].[WI]) AS TotalWI, Round(TotalWI/TotalWeight,1) AS [Index]
FROM WI
WHERE [WI].[L1]=1 And [WI].[L2]=1 And [WI].[L3]=1;
I intend to create a view in MS SQL with the MS Access SELECT statement like this.
CREATE VIEW KC AS
SELECT SUM([WI].[Weight]) AS TotalWeight, SUM([WI].[WI]) AS TotalWI, Round(TotalWI/TotalWeight,1) AS [Index]
FROM WI
WHERE [WI].[L1]=1 And [WI].[L2]=1 And [WI].[L3]=1
It gives me the Invalid Column Error.
Thanks. Any help will be greatly appreciated.
Regards,
Susan