Click here to Skip to main content
       

Database

 
AnswerRe: SQL Server 2005 Express running slow ? PinmemberMycroft Holmes28-Jan-13 18:02 
AnswerRe: SQL Server 2005 Express running slow ? PinmemberJOAT-MON29-Jan-13 12:09 
QuestionCombining Data From Temp Tables PinmemberMatt U.28-Jan-13 9:46 
AnswerRe: Combining Data From Temp Tables PinmemberDavid Mujica28-Jan-13 10:13 
GeneralRe: Combining Data From Temp Tables PinmemberMatt U.28-Jan-13 10:54 
GeneralRe: Combining Data From Temp Tables PinmemberJörgen Andersson28-Jan-13 12:18 
GeneralRe: Combining Data From Temp Tables PinmemberMatt U.28-Jan-13 13:13 
GeneralRe: Combining Data From Temp Tables PinmemberMycroft Holmes28-Jan-13 13:00 
I agree with Jorgen, Pivot is you best option, and the database should be normalised, the design is rubbish!
 
Alternatively you could do this:
 
Select Name, Part, 1 Passed,0 Finished,0 Scrap
from PassedTable
UNION 
Select Name, Part, 0 Passed,1 Finished,0 Scrap
from FinishedTable
UNION
Select Name, Part, 0 Passed,0 Finished,1 Scrap
from ScrapTable
 
Group and sum the results as required.
Never underestimate the power of human stupidity
RAH

GeneralRe: Combining Data From Temp Tables PinmemberMatt U.28-Jan-13 13:16 
AnswerRe: Combining Data From Temp Tables PinmemberJörgen Andersson28-Jan-13 23:57 
GeneralRe: Combining Data From Temp Tables PinmemberMatt U.29-Jan-13 3:52 
GeneralRe: Combining Data From Temp Tables PinmemberJörgen Andersson29-Jan-13 4:02 
GeneralRe: Combining Data From Temp Tables PinmemberJörgen Andersson28-Jan-13 23:28 
Question[VB.net+ADO.net]how can combobox 1 control the result of combobox2 PinmemberAchilles8428-Jan-13 9:20 
AnswerRe: [VB.net+ADO.net]how can combobox 1 control the result of combobox2 PinmemberAchilles8430-Jan-13 4:47 
QuestionSMO Retrieve Table Record Pinmembersavbace28-Jan-13 3:31 
AnswerRe: SMO Retrieve Table Record PinmvpSandeep Mewara28-Jan-13 3:42 
AnswerRe: SMO Retrieve Table Record Pinmembersavbace28-Jan-13 3:55 
QuestionRe: SMO Retrieve Table Record PinmvpEddy Vluggen28-Jan-13 4:21 
AnswerRe: SMO Retrieve Table Record PinmvpSandeep Mewara28-Jan-13 4:22 
AnswerRe: SMO Retrieve Table Record Pinmembersavbace28-Jan-13 4:40 
Questionhow can reporting in this Situation [modified] Pinmemberkarimkpg26-Jan-13 3:38 
AnswerRe: how can reporting in this Situation PinmvpSandeep Mewara26-Jan-13 7:02 
QuestionQuery to concatenate multiple rows based on sequence in results set PinmemberAlex Lush24-Jan-13 23:43 
AnswerRe: Query to concatenate multiple rows based on sequence in results set PinmvpEddy Vluggen25-Jan-13 2:51 

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

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


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 19 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid