Not seeing data in Database View??

wdookie
Mega Contributor

I am currently working on a Database View, so I can do a report.   The report consists of data from 3 tables (pm_project, pm_project_task and time_card).   My database view that I am playing with consists of the following View Tables:

 

find_real_file.png

 

On the project task table I am matching the task number to the task number on the time card table.

 

On the project table I am matching the Project Number to the Project Number on the Project Task Table.

 

My Left Join criteria I have set all to true, since right now this is the only way I am getting data back.   However, the 81 data records   I am getting back looks like junk:

 

find_real_file.png

 

Fields are blank, or they say, false, UNKNOWN, (empty)...

 

I know I am doing something fundamentally wrong here.   Any guidance will be GREATLY appreciated.

 

Thanks!!!!!!

6 REPLIES 6

mreaves
Giga Contributor

WDookie,



Go back and name the variables that you want to work with in the tables.   Only include the variables that you want in your report and the variables that you need to perform the joins.   You're most likely seeing every column from each table.   If you add the specific variables you want to work with it will be easier to see what's not matching.   Read the section titled: 2.3 Task 3: Specify Fields to Return on the wiki at Database Views - ServiceNow Wiki.   My next recommendation would be to try toggling off the left join on some of the tables.   Also, keep in mind that ORDER matters.   Think in terms of laying down table 100 then layering on table 200, etc.   is a



Good luck, this is an area that requires patience, trial & error.



Mike


Did you find a solution for this?



Thanks,


Anusha


I have the same problem. Not sure what is wrong.


wdookie
Mega Contributor

I did find my issue, I was trying to use number in my where clause.   I needed to use sys_id.   So my view table now looks like:



find_real_file.png



Now everything works!



Hope that helps.