tsql - Outputting Total Rows -


The query below is not being parsed by SQL Server and I can understand that column names are aliased What I need to do is equally done. The idea behind the query is to calculate the rows using CTE.

  DECLARE @TotalRows as INT = 0 - Order as Order (Order SELECT @TotalRows = COUNT (Customer ID), SalesOride, Customer ID, Order Order Order Order. Date = '2007/07 / 01') Select C. Customer ID, order. Sales order ed, order. Order date from sale Customer ASC Inner GC ClassierID = Order on order. Order by Customer Id Order. Order date DESC;   

How can I modify the query to prepare the desired retol?

Thank you.

try it

  SELECT C.CustomerID, O.SalesOrderID, O.OrderDate Sales.Customer AS C INNER JOIN SALE. SalesOrderHeader O ON C .CustomerID = O.CustomerID WHERE O.OrderDate = '2007/07/01' Order and orderdate DESC;    

Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -