October 26, 2018 at 4:44 am
Hi
What is wrong in the below query. It is saying Target invalid column name . I have written below code in function
Select @Lowest= SUM(Target) FROM (Select Top 10 Target from [test] order by Target Asc)
Thanks
October 26, 2018 at 4:54 am
jsshivalik - Friday, October 26, 2018 4:44 AMHiWhat is wrong in the below query. It is saying Target invalid column name . I have written below code in function
Select @Lowest= SUM(Target) FROM (Select Top 10 Target from [test] order by Target Asc)
Thanks
The error indicates that the column Target is not on table test.
There is a different error in the query you posted, this is that the inline table definition has to have an alias:Select @Lowest= SUM(A.Target)
FROM (Select Top 10 Target from [test] order by Target Asc) A
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply