mnoisette
asked on
Declaring and Setting SQL Variables
I am trying to write a SQL statement that uses a very simple variable.
I keep getting an error that says:
"The multipart identifier could not de bound"
Here is an example of my statement:
USE TSQL2012
GO
DECLARE @Total Int;
SET @Total = (Sales.OrderDetail.unitpri ce * Sales.OrderDetail.qty)
SELECT @Total AS 'Total Price'
FROM Sales.OrderDetail
What am I missing
I keep getting an error that says:
"The multipart identifier could not de bound"
Here is an example of my statement:
USE TSQL2012
GO
DECLARE @Total Int;
SET @Total = (Sales.OrderDetail.unitpri
SELECT @Total AS 'Total Price'
FROM Sales.OrderDetail
What am I missing
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.