Below is the SQL query for a report I am trying generate in Crystal. I can get all the fields I want from the varioius tables to show up in the report except the USR from the USR table. I have tried changing the link type to Outer, Left, Right and full.
I am fairly new to Crystal, any advice is greatly appreciated.
SELECT "inc_data"."event_type", "incident"."incident_ref", "item"."item_sc", "item_1"."item_sc", "item_2"."item_sc", "act_reg"."act_rmk", "inc_cat"."inc_cat_sc", "inc_cat_1"."inc_cat_sc", "incident"."inc_desc1", "act_reg"."act_type_sc", "act_reg"."date_actioned", "usr"."usr_n"
FROM ((((((("AX_ASSYST"."dbo"."incident" "incident" INNER JOIN "AX_ASSYST"."dbo"."act_reg" "act_reg" ON "incident"."incident_id"="act_reg"."incident_id") INNER JOIN "AX_ASSYST"."dbo"."inc_cat" "inc_cat" ON "incident"."inc_cat_id"="inc_cat"."inc_cat_id") INNER JOIN "AX_ASSYST"."dbo"."inc_data" "inc_data" ON "incident"."incident_id"="inc_data"."incident_id") INNER JOIN "AX_ASSYST"."dbo"."item" "item" ON "incident"."item_id"="item"."item_id") INNER JOIN "AX_ASSYST"."dbo"."inc_cat" "inc_cat_1" ON "incident"."cause_id"="inc_cat_1"."inc_cat_id") INNER JOIN "AX_ASSYST"."dbo"."item" "item_2" ON "incident"."cause_item_id"="item_2"."item_id") INNER JOIN "AX_ASSYST"."dbo"."usr" "usr" ON "incident"."usr_id"="usr"."usr_id") INNER JOIN "AX_ASSYST"."dbo"."item" "item_1" ON "inc_data"."item_b_id"="item_1"."item_id"
WHERE "act_reg"."act_type_sc"=N'CMDB CHANGE' AND "act_reg"."date_actioned">={ts '2013-01-01 00:00:00'}
ORDER BY "act_reg"."date_actioned"
Cheers
Bill
I am fairly new to Crystal, any advice is greatly appreciated.
SELECT "inc_data"."event_type", "incident"."incident_ref", "item"."item_sc", "item_1"."item_sc", "item_2"."item_sc", "act_reg"."act_rmk", "inc_cat"."inc_cat_sc", "inc_cat_1"."inc_cat_sc", "incident"."inc_desc1", "act_reg"."act_type_sc", "act_reg"."date_actioned", "usr"."usr_n"
FROM ((((((("AX_ASSYST"."dbo"."incident" "incident" INNER JOIN "AX_ASSYST"."dbo"."act_reg" "act_reg" ON "incident"."incident_id"="act_reg"."incident_id") INNER JOIN "AX_ASSYST"."dbo"."inc_cat" "inc_cat" ON "incident"."inc_cat_id"="inc_cat"."inc_cat_id") INNER JOIN "AX_ASSYST"."dbo"."inc_data" "inc_data" ON "incident"."incident_id"="inc_data"."incident_id") INNER JOIN "AX_ASSYST"."dbo"."item" "item" ON "incident"."item_id"="item"."item_id") INNER JOIN "AX_ASSYST"."dbo"."inc_cat" "inc_cat_1" ON "incident"."cause_id"="inc_cat_1"."inc_cat_id") INNER JOIN "AX_ASSYST"."dbo"."item" "item_2" ON "incident"."cause_item_id"="item_2"."item_id") INNER JOIN "AX_ASSYST"."dbo"."usr" "usr" ON "incident"."usr_id"="usr"."usr_id") INNER JOIN "AX_ASSYST"."dbo"."item" "item_1" ON "inc_data"."item_b_id"="item_1"."item_id"
WHERE "act_reg"."act_type_sc"=N'CMDB CHANGE' AND "act_reg"."date_actioned">={ts '2013-01-01 00:00:00'}
ORDER BY "act_reg"."date_actioned"
Cheers
Bill