visopenlive
Programmer
Hai
This is my query to give contractx expiring in 15 days but I am getting lot of repetitions. How could I avoid them?
select A.DATAID, A.Filename, to_char(A.ValDate,'Month DD, YYYY') "EXPIRY DATE", REPLACE(A.ExpireIn,'?','') "EXPIRE IN # OF DAYS" , A.Location LOCATION
FROM
(select D.DATAID, V.FILENAME Filename, L.ValDate,
L.ValDate-trunc(sysdate) ExpireIn, V.MimeType DocType,
L.ValDate-trunc(sysdate) "ExpireIn", LL_PATH(D.DATAID) Location
from DTree D, LLAttrData L, DVersData V
where D.DataID=V.DocID
and D.DataID=L.ID
and D.VersionNum=L.VerNum
and L.DefID=150061
and L.AttrID=7
and D.SUBTYPE=144
and L.ValDate-trunc(sysdate) between 0 and 30) A,
(select D.DATAID, V.FILENAME Filename, L.ValDate, V.MimeType DocType,
L.ValDate-trunc(sysdate) ExpireIn, LL_PATH(D.DATAID) Location
from DTree D, LLAttrData L, DVersData V
where D.DataID=V.DocID
and D.DataID=L.ID
and D.VersionNum=L.VerNum
and L.DefID=150061
and L.AttrID=3
and D.SUBTYPE=144
and L.VALINT='%1') B
WHERE A.DATAID = B.DATAID
Parameter is UserID.
Please help..thanks..
This is my query to give contractx expiring in 15 days but I am getting lot of repetitions. How could I avoid them?
select A.DATAID, A.Filename, to_char(A.ValDate,'Month DD, YYYY') "EXPIRY DATE", REPLACE(A.ExpireIn,'?','') "EXPIRE IN # OF DAYS" , A.Location LOCATION
FROM
(select D.DATAID, V.FILENAME Filename, L.ValDate,
L.ValDate-trunc(sysdate) ExpireIn, V.MimeType DocType,
L.ValDate-trunc(sysdate) "ExpireIn", LL_PATH(D.DATAID) Location
from DTree D, LLAttrData L, DVersData V
where D.DataID=V.DocID
and D.DataID=L.ID
and D.VersionNum=L.VerNum
and L.DefID=150061
and L.AttrID=7
and D.SUBTYPE=144
and L.ValDate-trunc(sysdate) between 0 and 30) A,
(select D.DATAID, V.FILENAME Filename, L.ValDate, V.MimeType DocType,
L.ValDate-trunc(sysdate) ExpireIn, LL_PATH(D.DATAID) Location
from DTree D, LLAttrData L, DVersData V
where D.DataID=V.DocID
and D.DataID=L.ID
and D.VersionNum=L.VerNum
and L.DefID=150061
and L.AttrID=3
and D.SUBTYPE=144
and L.VALINT='%1') B
WHERE A.DATAID = B.DATAID
Parameter is UserID.
Please help..thanks..