cancel
Showing results for 
Search instead for 
Did you mean: 

SQL query - getting data from other tables

former_member391531
Active Participant
0 Kudos

Hi, I am creating a new query to see all open service calls for a particular user. I'm using the oscl table. But rather than displaying a number for the 'status' or 'handled by' field, it is possible to display the actual name for each of these values instead in the results.

SELECT T0.[callID], T0.[status], T0.[subject], T0.[customer], T0.[custmrName], T0.[assignee], T0.[descrption] FROM OSCL T0 WHERE T0.[assignee] = 11 and T0.[status] != -1 ORDER BY T0.[createDate] desc

Thanks, Eoin

Accepted Solutions (1)

Accepted Solutions (1)

former_member391531
Active Participant

From doing more research I have found the answer I needed. Putting this here in case it helps anyone else.

This will list all open calls in a query & show the Status description & the user name instead of the numbers on the results displayed.

SELECT T0.[callID], T1.[NAME], T0.[subject], T0.[customer], T0.[custmrName], T2.[USER_CODE], T0.[descrption] FROM OSCL T0 inner join OSCS T1 on t0.[status] = T1.[statusid] inner join ousr T2 on T0.assignee=T2.uSERID WHERE T0.[assignee] = 11 and T0.[status] != -1 ORDER BY T0.[createDate] asc

Johan_H
Active Contributor
0 Kudos

Hi Eoin,

Thank you for sharing your solution. Too few people do that when they figure it out themselves.

Please mark your answer as best answer, and then close the thread, so if anyone sees this post come up in a search, they will know right away that it contains a solution.

Regards,

Johan

Answers (0)