Hello,
I am trying to make a field in that displays in rows to show in colums. The field is "IDCASE00".IDLTYP" it has three entries OSS, RSV and TRL. When I run the SQL below I get the following results
SKUA 100 RSV
SKUA 125 OSS
SKUA 200 TRL
but I need it to be like the following
SKUA 100 125 200
Can this be done? I am new to SQL and any assistants would be greatly appricated.
Thank you
SELECT "PHPICK12"."PHPSTF", "PDPICK00"."PDPCTL", "PDPICK00"."PDPIQT", "IDCASE00"."IDLTYP", "IDCASE00"."IDSTYL", "IDCASE00"."IDSSFX", "IDCASE00"."IDCOLR", "IDCASE00"."IDCSFX", "IDCASE00"."IDQUAL", "IDCASE00"."IDSDIM", "IDCASE00"."IDSZDS",
SUM ("IDCASE00"."IDQTY")
FROM ("MDCPKMSP"."K231WBPRDD"."PHPICK12" "PHPICK12" INNER JOIN "MDCPKMSP"."K231WBPRDD"."PDPICK00" "PDPICK00" ON "PHPICK12"."PHPCTL"="PDPICK00"."PDPCTL") INNER JOIN "MDCPKMSP"."K231WBPRDD"."IDCASE00" "IDCASE00" ON ((((("PDPICK00"."PDSTYL"="IDCASE00"."IDSTYL") AND ("PDPICK00"."PDSSFX"="IDCASE00"."IDSSFX")) AND ("PDPICK00"."PDCOLR"="IDCASE00"."IDCOLR")) AND ("PDPICK00"."PDCSFX"="IDCASE00"."IDCSFX")) AND ("PDPICK00"."PDSDIM"="IDCASE00"."IDSDIM")) AND ("PDPICK00"."PDSZDS"="IDCASE00"."IDSZDS")
WHERE "IDCASE00"."IDSTAT"='30'
GROUP BY "IDCASE00"."IDSTYL", "IDCASE00"."IDSSFX", "IDCASE00"."IDCOLR", "IDCASE00"."IDCSFX", "IDCASE00"."IDQUAL", "IDCASE00"."IDSDIM", "IDCASE00"."IDSZDS", "IDCASE00"."IDLTYP", "PHPICK12"."PHPSTF", "PDPICK00"."PDPCTL", "PDPICK00"."PDPIQT
I am trying to make a field in that displays in rows to show in colums. The field is "IDCASE00".IDLTYP" it has three entries OSS, RSV and TRL. When I run the SQL below I get the following results
SKUA 100 RSV
SKUA 125 OSS
SKUA 200 TRL
but I need it to be like the following
SKUA 100 125 200
Can this be done? I am new to SQL and any assistants would be greatly appricated.
Thank you
SELECT "PHPICK12"."PHPSTF", "PDPICK00"."PDPCTL", "PDPICK00"."PDPIQT", "IDCASE00"."IDLTYP", "IDCASE00"."IDSTYL", "IDCASE00"."IDSSFX", "IDCASE00"."IDCOLR", "IDCASE00"."IDCSFX", "IDCASE00"."IDQUAL", "IDCASE00"."IDSDIM", "IDCASE00"."IDSZDS",
SUM ("IDCASE00"."IDQTY")
FROM ("MDCPKMSP"."K231WBPRDD"."PHPICK12" "PHPICK12" INNER JOIN "MDCPKMSP"."K231WBPRDD"."PDPICK00" "PDPICK00" ON "PHPICK12"."PHPCTL"="PDPICK00"."PDPCTL") INNER JOIN "MDCPKMSP"."K231WBPRDD"."IDCASE00" "IDCASE00" ON ((((("PDPICK00"."PDSTYL"="IDCASE00"."IDSTYL") AND ("PDPICK00"."PDSSFX"="IDCASE00"."IDSSFX")) AND ("PDPICK00"."PDCOLR"="IDCASE00"."IDCOLR")) AND ("PDPICK00"."PDCSFX"="IDCASE00"."IDCSFX")) AND ("PDPICK00"."PDSDIM"="IDCASE00"."IDSDIM")) AND ("PDPICK00"."PDSZDS"="IDCASE00"."IDSZDS")
WHERE "IDCASE00"."IDSTAT"='30'
GROUP BY "IDCASE00"."IDSTYL", "IDCASE00"."IDSSFX", "IDCASE00"."IDCOLR", "IDCASE00"."IDCSFX", "IDCASE00"."IDQUAL", "IDCASE00"."IDSDIM", "IDCASE00"."IDSZDS", "IDCASE00"."IDLTYP", "PHPICK12"."PHPSTF", "PDPICK00"."PDPCTL", "PDPICK00"."PDPIQT