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

Database

 
GeneralRe: Pivot? Pin
mark_w_28-Oct-10 4:25
mark_w_28-Oct-10 4:25 
AnswerRe: Pivot? Pin
Mycroft Holmes28-Oct-10 13:56
professionalMycroft Holmes28-Oct-10 13:56 
GeneralRe: Pivot? Pin
mark_w_28-Oct-10 21:42
mark_w_28-Oct-10 21:42 
GeneralRe: Pivot? Pin
Mycroft Holmes28-Oct-10 22:20
professionalMycroft Holmes28-Oct-10 22:20 
GeneralRe: Pivot? Pin
mark_w_28-Oct-10 22:32
mark_w_28-Oct-10 22:32 
GeneralRe: Pivot? Pin
Jörgen Andersson28-Oct-10 23:26
professionalJörgen Andersson28-Oct-10 23:26 
GeneralRe: Pivot? Pin
mark_w_29-Oct-10 4:28
mark_w_29-Oct-10 4:28 
GeneralRe: Pivot? Pin
Jörgen Andersson29-Oct-10 5:42
professionalJörgen Andersson29-Oct-10 5:42 
You should consider normalizing the table. It would make it a lot easier in the future to add functionality.

Consider this:
CREATE TABLE Incidents (
    Site varchar
    IncidentType varchar,
    IncidentDate Date,
    Incidentinfo varchar,
    ...
)
Then just make your pivot on Select site,incidenttype,count(*) as incidentcount from incidents


You may also exchange site and incidenttype for IDs referencing tables holding info on sites and incidenttypes.
If you add a site to your organisation you simply add a row in a table.

"When did ignorance become a point of view" - Dilbert

GeneralRe: Pivot? Pin
Mycroft Holmes29-Oct-10 0:27
professionalMycroft Holmes29-Oct-10 0:27 
Questionzip file Pin
tan87327-Oct-10 23:42
tan87327-Oct-10 23:42 
AnswerRe: zip file Pin
Simon_Whale28-Oct-10 5:13
Simon_Whale28-Oct-10 5:13 
GeneralRe: zip file Pin
jschell28-Oct-10 8:11
jschell28-Oct-10 8:11 
AnswerRe: zip file Pin
jschell28-Oct-10 8:14
jschell28-Oct-10 8:14 
QuestionCheck the database for existency. Pin
T.RATHA KRISHNAN27-Oct-10 21:30
T.RATHA KRISHNAN27-Oct-10 21:30 
AnswerRe: Check the database for existency. Pin
Andy_L_J27-Oct-10 21:50
Andy_L_J27-Oct-10 21:50 
QuestionRe: Check the database for existency. [modified] Pin
T.RATHA KRISHNAN28-Oct-10 0:14
T.RATHA KRISHNAN28-Oct-10 0:14 
AnswerRe: Check the database for existency. Pin
jschell28-Oct-10 8:22
jschell28-Oct-10 8:22 
Questionparameter with the In function Pin
Tamimi - Code26-Oct-10 22:55
Tamimi - Code26-Oct-10 22:55 
AnswerRe: parameter with the In function Pin
Blue_Boy26-Oct-10 23:11
Blue_Boy26-Oct-10 23:11 
GeneralRe: parameter with the In function Pin
Tamimi - Code26-Oct-10 23:47
Tamimi - Code26-Oct-10 23:47 
GeneralRe: parameter with the In function Pin
Blue_Boy26-Oct-10 23:50
Blue_Boy26-Oct-10 23:50 
GeneralRe: parameter with the In function Pin
Tamimi - Code27-Oct-10 0:05
Tamimi - Code27-Oct-10 0:05 
GeneralRe: parameter with the In function Pin
jschell28-Oct-10 8:29
jschell28-Oct-10 8:29 
AnswerRe: parameter with the In function Pin
John Gathogo27-Oct-10 0:01
John Gathogo27-Oct-10 0:01 
GeneralRe: parameter with the In function Pin
Tamimi - Code27-Oct-10 0:18
Tamimi - Code27-Oct-10 0: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.