Click here to Skip to main content
15,891,856 members
Home / Discussions / Database
   

Database

 
AnswerRe: Error in C# - not making sense Pin
Dave Kreskowiak13-Jan-06 5:28
mveDave Kreskowiak13-Jan-06 5:28 
GeneralRe: Error in C# - not making sense Pin
TheJudeDude13-Jan-06 12:23
TheJudeDude13-Jan-06 12:23 
GeneralRe: Error in C# - not making sense Pin
Dave Kreskowiak13-Jan-06 15:02
mveDave Kreskowiak13-Jan-06 15:02 
GeneralRe: Error in C# - not making sense Pin
TheJudeDude13-Jan-06 15:38
TheJudeDude13-Jan-06 15:38 
QuestionOLTP and Reporting databases seperated? Pin
erdsah8812-Jan-06 10:27
erdsah8812-Jan-06 10:27 
AnswerRe: OLTP and Reporting databases seperated? Pin
Colin Angus Mackay12-Jan-06 11:06
Colin Angus Mackay12-Jan-06 11:06 
GeneralRe: OLTP and Reporting databases seperated? Pin
erdsah8812-Jan-06 21:15
erdsah8812-Jan-06 21:15 
QuestionCounts and CrossTabs Pin
john john mackey12-Jan-06 8:08
john john mackey12-Jan-06 8:08 
I want to produce a table of counts, by month, for each part type I have in inventory. Here is my table defintion:
tbl_MainReport.ReportID - primary key
tbl_MainReport.Author - text
tbl_MainReport.POI_Time - purchased date
tbl_MainReport.PartType - 1..5  (1=wrench,2=hammer,3=driver,4=plier,5=knife)
tbl_MainReport.PartSubType - 1..8
tbl_MainReport.Description - memo


I have created a SQL statement that comes close, but groups by the "raw" date (MM/DD/YYYY HH:mm:ss) and not just by months:

TRANSFORM Count(*) AS TotalByPartType
SELECT tbl_MainReportInfo.POI_Time
FROM tbl_MainReportInfo
GROUP BY tbl_MainReportInfo.POI_Time
ORDER BY tbl_MainReportInfo.POI_Time
PIVOT tbl_MainReportInfo.PartType;


This creates a listing like this:
       POI_Time  |  1  |  2  |  3  |  4  |  5
m/d/yyyy h:mm:ss    #
m/d/yyyy h:mm:ss                #
m/d/yyyy h:mm:ss          #
...


But I want something like this:
POI_Time  |  1  |  2  |  3  |  4  |  5
JAN          ##                ##
FEB                ##    ##
...


Can you help? Should I just revert to coding up a "Recordset"?

Thanks,
Johnny
AnswerRe: Counts and CrossTabs Pin
Colin Angus Mackay12-Jan-06 11:04
Colin Angus Mackay12-Jan-06 11:04 
GeneralRe: Counts and CrossTabs Pin
john john mackey12-Jan-06 11:34
john john mackey12-Jan-06 11:34 
QuestionData from two using a third table Pin
gharry12-Jan-06 5:41
gharry12-Jan-06 5:41 
AnswerRe: Data from two using a third table Pin
Colin Angus Mackay12-Jan-06 11:00
Colin Angus Mackay12-Jan-06 11:00 
GeneralRe: Data from two using a third table Pin
gharry12-Jan-06 22:10
gharry12-Jan-06 22:10 
GeneralRe: Data from two using a third table Pin
gharry12-Jan-06 23:30
gharry12-Jan-06 23:30 
GeneralRe: Data from two using a third table Pin
Colin Angus Mackay12-Jan-06 23:44
Colin Angus Mackay12-Jan-06 23:44 
QuestionWhat is a named variable and why use it? Pin
kenn_rosie12-Jan-06 5:39
kenn_rosie12-Jan-06 5:39 
AnswerRe: What is a named variable and why use it? Pin
Colin Angus Mackay12-Jan-06 10:57
Colin Angus Mackay12-Jan-06 10:57 
QuestionDistinct in join - please help Pin
xaphod12-Jan-06 3:32
xaphod12-Jan-06 3:32 
AnswerRe: Distinct in join - please help Pin
Michael Potter12-Jan-06 4:55
Michael Potter12-Jan-06 4:55 
GeneralRe: Distinct in join - please help Pin
xaphod15-Jan-06 8:47
xaphod15-Jan-06 8:47 
QuestionSQL dyanamic ORDER BY Pin
smile869112-Jan-06 2:44
smile869112-Jan-06 2:44 
AnswerRe: SQL dyanamic ORDER BY Pin
Colin Angus Mackay12-Jan-06 2:55
Colin Angus Mackay12-Jan-06 2:55 
GeneralRe: SQL dyanamic ORDER BY Pin
smile869112-Jan-06 3:57
smile869112-Jan-06 3:57 
QuestionReplication Connection String Problem Pin
pr0wl3r11-Jan-06 6:46
pr0wl3r11-Jan-06 6:46 
AnswerRe: Replication Connection String Problem Pin
gharry12-Jan-06 22:18
gharry12-Jan-06 22:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.