/build/static/layout/Breadcrumb_cap_w.png
07/31/2017 1003 views
I have created the following custom assets. . .
FS54tQ.png8eos0a.pngoh3pBT.png
The data I need is in AD_11.FIELD_10068. What is needed depends on the selection of AD_16.FIELD_10044.
AD_16.FIELD_10044 is presented to the user, via a single select custom field in a ticket .
Depending on the selection, I look to AD_16 fields - FIELD_10062, 63, 64, 65, 66. To get the correct result from AD_11.FIELD_10068 I join the matching text in AD_16 fields to AD_11.FIELD_31. A simple query, for one of the AD_16 fields runs very quickly. For example -

SELECT
    ASSET_DATA_16.FIELD_10042 AS Program_number,
    ASSET_DATA_16.FIELD_10043 AS Status,
    ASSET_DATA_16.FIELD_10053 AS Media_Center,
    RPM.FIELD_10068 AS Reg_Prgm_Mgr
FROM ASSET_DATA_16
LEFT JOIN ASSET_DATA_11 RPM ON RPM.FIELD_31 = ASSET_DATA_16.FIELD_10062
GROUP BY Program_number

returns what I am after very quickly.

I can add one more of the AD_16 fields and corresponding join to this query and it runs satisfactorily but, trying to query for any more fields or all five fields at the same time runs on and on. There are instances where only 2 or 3 of the AD_16 fields have data but, I need to query all 5 fields every time.

Any help would be most appreciated. I have other questions around these asset tables but this one is urgent and I need to get it resolved ASAP.
Answer Summary:
0 Comments   [ + ] Show comments

Comments


Answer Chosen by the Author

0
See - http://www.itninja.com/question/trouble-connecting-the-sql-dots
Answered 09/15/2017 by: jmarotto
Third Degree Green Belt

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share