I'm using Oracle SQL, in i have a table with have alot of data. Im trying to get a grand total by combining all Part count. My query is below.
Basically i have Part which are name REX, DUB, FLEX. I can get the grand total of the part DUB. But i'm trying to combine all part which are REX,DUB, and FLEX. If I try in combine all in get a grand total of how many parts are in the table on a date. I get a Total of 0.
Here's the query give me a zero when combing all part in gives me a zero: SELECT count(SETPN) as Total FROM ZJIS_USA_CM WHERE CTYPE = 'DP'AND CTYPE = 'IX' AND CTYPE = 'TK' AND CTYPE = 'IX'AND STYPE ='SN'AND PRODDATE = '20130223'
This query work only for one part: SELECT count(SITPU) as Total FROM JUS_UATB WHERE Part = 'DUB' AND TYPE ='SN' AND DATE = '20130223'
Basically i have Part which are name REX, DUB, FLEX. I can get the grand total of the part DUB. But i'm trying to combine all part which are REX,DUB, and FLEX. If I try in combine all in get a grand total of how many parts are in the table on a date. I get a Total of 0.
Here's the query give me a zero when combing all part in gives me a zero: SELECT count(SETPN) as Total FROM ZJIS_USA_CM WHERE CTYPE = 'DP'AND CTYPE = 'IX' AND CTYPE = 'TK' AND CTYPE = 'IX'AND STYPE ='SN'AND PRODDATE = '20130223'
This query work only for one part: SELECT count(SITPU) as Total FROM JUS_UATB WHERE Part = 'DUB' AND TYPE ='SN' AND DATE = '20130223'