Say I have data in tblMovie like so:
If I execute:
SELECT MovieTitle FROM tblMovie WHERE Director = "Jones", I would get:
The result set would return 3 titles - but that's not really accurate, because it really should only be two titles.
Without using a reporting tool, in TSQL is there a way to return a result set that looks something like:
Code:
MovieTitle Genre Director
-------------------- ------ --------
Sleepless In Seattle Comedy Jones
Sleepless In Seattle Romance Jones
Die Hard2 Action Smith
When Harry Met Sally Romance Jones
If I execute:
SELECT MovieTitle FROM tblMovie WHERE Director = "Jones", I would get:
Code:
MovieTitle Genre Director
-------------------- ------ --------
Sleepless In Seattle Comedy Jones
Sleepless In Seattle Romance Jones
When Harry Met Sally Romance Jones
The result set would return 3 titles - but that's not really accurate, because it really should only be two titles.
Without using a reporting tool, in TSQL is there a way to return a result set that looks something like:
Code:
MovieTitle Genre Director
-------------------- ------ --------
Sleepless In Seattle Comedy/Romance Jones
When Harry Met Sally Romance Jones