I need to show the table name for troublshooting in a lot of Selects on different Tables.
Is there a was to get it without having to hard code it in like I it did below. It does not work anyway.
Part of the issue is I need to do a group by.
DougP
Is there a was to get it without having to hard code it in like I it did below. It does not work anyway.
Part of the issue is I need to do a group by.
Code:
Select 'Tablename', manager, ResourceLastName, ResourceFirstName
from SOWTimeReporting
Where ResourceLastName = @lastname
Group by 'Tablename', manager,ResourceLastName, ResourceFirstName
like ????
Select TABLE SCHEMA THINGY HERE, manager, ResourceLastName, ResourceFirstName
from SOWTimeReporting
Where ResourceLastName = @lastname
Group by TABLE SCHEMA THINGY HERE, manager,ResourceLastName, ResourceFirstName
DougP