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

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -