sql - Access Pivot Query -


I want to create a crosstab query, where Pivot is the area with natural numbers (delayed days of a document) but I want to I am a group (those documents have been delayed by less than 1 week, then delayed less than those two weeks, and then the rest of the document), but I try and only those people whose delay day is only 1 Week and not less Not. This is my code: selection document of [quinta document no. 1] as

  Transformam calculation (BlueZilo. [Document number]). [Discipline international], bluesillo [Client Response Returns Position], Calculation (BlueLLO [Document Number]) From AS [Quentadedoc Number] BlueLLO Inner Doubles on BlueLLO [Document number] = documents. [Numero documento client] WHERE ((Document. [Document International]) = "N" Group By Documents [Discipline International], Blossilo [Client Response Return Status] Order of Documents [Discipline international], bluesillo [Client Response Return Status] PIVOT Blossilo. (Late Day) in (0, 7, 14, 21);   

The part I do not know how to implement is just the last paragraph:

  Pivot BlueCielo In the [late days] (0, 7, 14, 21);   

(BlueCielo is my desk and [Delayed] is the area with data).

When I

  PIVOT BlueCielo In the [delayed day] (0,> 7,> 14, & lt; 14);   

This gives me an error.

Can anyone help me? Thanks a lot!

I have tried with this and I have solved the problem! PIVOT IIF ([Late Day] 1, "0 Dias", IIF ([Late Day]] and Lieutenant; 7, "And Lieutenant; 1 Walk", IIF ([Late Day] and Lieutenant; 14, "Lieutenant; 2 Week ", IIF ([Late Day] 21," Lt; 3 Weeks ","> 3 Weeks "));

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 -