Crystal 8, sql 2000
I am trying to change a table from inside the sql query window, but I can't make crystal see the fields. It doesn't give me an error, it just won't see it. If I were to change the table in sql, I would verify database to make it see it - how can I make it see the changed sql query?
I think that what I'm doing would be called a left outer join to a derived table. I'm changing ...
SELECT
Warrants."ID", Warrants."Fund", Warrants."WarrantNo", Warrants."payyear", Warrants."date101", Warrants."PR", Warrants."PRType", Warrants."vendor", Warrants."printwar", Warrants."amount", Warrants."Link3", Warrants."district",
Vendors."ssno",
warrantcomment."E1",
Object."Typ", Object."Key1"
FROM
{ oj ((("RMKRS"."dbo"."Warrants" Warrants INNER JOIN "RMKRS"."dbo"."v_Funds" v_Funds ON
Warrants."Link1" = v_Funds."id"
INNER JOIN "RMKRS"."dbo"."Object" warrantcomment ON
Warrants."ID" = warrantcomment."ID"
INNER JOIN "RMKRS"."dbo"."Vendors" Vendors ON
Warrants."Link3" = Vendors."id"
INNER JOIN "RMKRS"."dbo"."Object" Object ON
v_Funds."link1" = Object."ID"}
WHERE
Object."Typ" = 56
ORDER BY
Warrants."vendor" ASC,
Warrants."district" ASC,
Warrants."ID" ASC
To...
SELECT
Warrants."ID", Warrants."Fund", Warrants."WarrantNo", Warrants."payyear", Warrants."date101", Warrants."PR", Warrants."PRType", Warrants."vendor", Warrants."printwar", Warrants."amount", Warrants."Link3", Warrants."district",
Vendors."ssno",
warrantcomment."E1",
Object."Typ", Object."Key1",
district."distname"
FROM
{ oj (((("RMKRS"."dbo"."Warrants" Warrants INNER JOIN "RMKRS"."dbo"."v_Funds" v_Funds ON
Warrants."Link1" = v_Funds."id"
INNER JOIN "RMKRS"."dbo"."Object" warrantcomment ON
Warrants."ID" = warrantcomment."ID"
INNER JOIN "RMKRS"."dbo"."Vendors" Vendors ON
Warrants."Link3" = Vendors."id"
INNER JOIN "RMKRS"."dbo"."Object" Object ON
v_Funds."link1" = Object."ID"
left outer join
(select case when count(distinct po.c2)>1 then 'Multiple' else max(po.c2) end as distname, detail.link3 as warid
from object po, object detail where
detail.link1=po.id and
po.typ=62 and detail.typ=67 group by detail.link3) district on
warrants.id=district.warid}
WHERE
Object."Typ" = 56
ORDER BY
Warrants."vendor" ASC,
Warrants."district" ASC,
Warrants."ID" ASC
I am trying to change a table from inside the sql query window, but I can't make crystal see the fields. It doesn't give me an error, it just won't see it. If I were to change the table in sql, I would verify database to make it see it - how can I make it see the changed sql query?
I think that what I'm doing would be called a left outer join to a derived table. I'm changing ...
SELECT
Warrants."ID", Warrants."Fund", Warrants."WarrantNo", Warrants."payyear", Warrants."date101", Warrants."PR", Warrants."PRType", Warrants."vendor", Warrants."printwar", Warrants."amount", Warrants."Link3", Warrants."district",
Vendors."ssno",
warrantcomment."E1",
Object."Typ", Object."Key1"
FROM
{ oj ((("RMKRS"."dbo"."Warrants" Warrants INNER JOIN "RMKRS"."dbo"."v_Funds" v_Funds ON
Warrants."Link1" = v_Funds."id"
INNER JOIN "RMKRS"."dbo"."Object" warrantcomment ON
Warrants."ID" = warrantcomment."ID"
INNER JOIN "RMKRS"."dbo"."Vendors" Vendors ON
Warrants."Link3" = Vendors."id"
INNER JOIN "RMKRS"."dbo"."Object" Object ON
v_Funds."link1" = Object."ID"}
WHERE
Object."Typ" = 56
ORDER BY
Warrants."vendor" ASC,
Warrants."district" ASC,
Warrants."ID" ASC
To...
SELECT
Warrants."ID", Warrants."Fund", Warrants."WarrantNo", Warrants."payyear", Warrants."date101", Warrants."PR", Warrants."PRType", Warrants."vendor", Warrants."printwar", Warrants."amount", Warrants."Link3", Warrants."district",
Vendors."ssno",
warrantcomment."E1",
Object."Typ", Object."Key1",
district."distname"
FROM
{ oj (((("RMKRS"."dbo"."Warrants" Warrants INNER JOIN "RMKRS"."dbo"."v_Funds" v_Funds ON
Warrants."Link1" = v_Funds."id"
INNER JOIN "RMKRS"."dbo"."Object" warrantcomment ON
Warrants."ID" = warrantcomment."ID"
INNER JOIN "RMKRS"."dbo"."Vendors" Vendors ON
Warrants."Link3" = Vendors."id"
INNER JOIN "RMKRS"."dbo"."Object" Object ON
v_Funds."link1" = Object."ID"
left outer join
(select case when count(distinct po.c2)>1 then 'Multiple' else max(po.c2) end as distname, detail.link3 as warid
from object po, object detail where
detail.link1=po.id and
po.typ=62 and detail.typ=67 group by detail.link3) district on
warrants.id=district.warid}
WHERE
Object."Typ" = 56
ORDER BY
Warrants."vendor" ASC,
Warrants."district" ASC,
Warrants."ID" ASC