SQL Get UID when Group by

Posted by Quandary on Stack Overflow See other posts from Stack Overflow or by Quandary
Published on 2010-04-08T06:40:10Z Indexed on 2010/04/08 6:43 UTC
Read the original article Hit count: 326

Filed under:
|
|

I do a select from table

[V_RPT_BelegungKostenstelleDetail] 
WHERE SO_UID = '7C7035C8-56DD-4A44-93CC-F16FD66280A3' 
AND GB_UID = '4FF1B0EE-A5DD-4699-94B7-760922666CE2'
AND GS_UID = '1188759A-54E1-4323-8BF2-85E71B3C796E'
AND RM_UID = '088C3559-6E6E-468A-9554-6740840FCBA1'
AND NA_UID= '96A2A8DB-8C83-4C60-9060-F0F55719AF5C'
GROUP BY KST_UID 

How can I get SO_UID? It is the same everywhere, but I get an error when I try to get SO_UID with the return values...

SO_UID is not necessarely given like '7C7035C8-56DD-4A44-93CC-F16FD66280A3' here, so I can't just add it manually as string.

© Stack Overflow or respective owner

Related posts about sql

Related posts about ms-sql