Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: NEED URGENT HELP PLEASE Post Reply Post New Topic
Author Message
vpriyanka2001
Groupie
Groupie


Joined: 28 May 2009
Online Status: Offline
Posts: 59
Quote vpriyanka2001 Replybullet Topic: NEED URGENT HELP PLEASE
    Posted: 09 Sep 2009 at 11:02am

OLD QUERY

In Old report, all the data was coming from one table Date_info

1 Formula used: Include:

IIF ({date_info.date_app_entered} <> #1/1/1900# and {date_info.date_app_recvd} <> #1/1/1900# and
    {date_info.date_qt_mailed} = #1/1/1900# and {date_info.date_gen_letter} = #1/1/1900# and
    {date_info.date_declined} = #1/1/1900# , "YES" ,  "NO")

-----
1 Record selection formula

{@Include} = "YES" and
{date_info.lifecycle_status} in ["QUOTE", "RENEWAL", "SUBMISSION"] and
{date_info.date_app_entered} >= Date (2008, 01, 01)


-----------------------------------------------------------

NEW QUERY

In New Report,

I need to JOIN 3 Tables and use all the old report Criteria to get the data.
BUt My New Query is failing on second last line please help.

/*+ PARALLEL(dateinfo,4)*/

select
d.ISN,
d.name_ins,
d.lifecycle_status,
d.date_app_entered,
p.date_app_recvd,
d.date_qt_mailed,
d.date_gen_letter,
d.date_declined,
d.uwinits,
d.bornum

from DateInfo D
left outer join policy p on d.lifecycle_status = p.lifecycle_status and
d.OBJECT_NUM  = p.POLICY_NUM and
d.object_ver = p.policy_ver

left outer join quote q on d.lifecycle_status =
q.lifecycle_status and
d.OBJECT_NUM  = q.quote_NUM and
d.object_ver = q.quote_ver
where
d.lifecycle_status in ('submission','quote','renewals')and
d.date_app_entered > '2008/01/01' and
p.date_app_recvd <> '1/1/1900' and
d.date_qt_mailed  =  '1/1/1900' and
d.date_gen_letter  = '1/1/1900' and
d.date_declined = datetime '1/1/1900' , "YES" ,  "NO")
order by d.date_app_entered
----------------------------------------
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 09 Sep 2009 at 12:35pm
Take out ', "YES" ,  "NO")' from that line.  It was part of the IIF statement in your original formula and it's not needed here.
 
-Dell
IP IP Logged
vpriyanka2001
Groupie
Groupie


Joined: 28 May 2009
Online Status: Offline
Posts: 59
Quote vpriyanka2001 Replybullet Posted: 10 Sep 2009 at 9:07am
My Query Below Works, But in Crystal format editor my
Field p.Date_app_recvd is not showing date time, I need to modify it to Date only.
Any Idea how to do that or if I can do that on my query it will be great.

In database field Date_app_recvd  data type is DATETIME



select
d.object_num,
d.object_ver,
q.quote_num,
q.quote_ver,
p.policy_num,
p.policy_ver,
d.ISN,
d.name_ins,
d.lifecycle_status,
d.date_app_entered,
q.date_app_recvd,
p.date_app_recvd,
d.date_qt_mailed,
d.date_gen_letter,
d.date_declined,
d.uwinits,
d.bornum
from dateinfo d
left outer join quote q
ON  d.object_num=q.quote_num
and d.object_ver=q.quote_ver
left outer join policy p
on d.object_num=p.policy_num
and d.object_ver=p.policy_ver
where
(d.lifecycle_status ='renewal' or
d.lifecycle_status = 'quote'  or
d.lifecycle_status = 'submission') and
(p.date_app_recvd <> '1/1/1900' or

 q.date_app_recvd <> '1/1/1900') and
d.date_app_entered > '2008/01/01' and

d.date_qt_mailed  =  '1/1/1900' and
d.date_gen_letter  = '1/1/1900' and
d.date_declined   = '1/1/1900'
order by d.date_app_entered

Edited by vpriyanka2001 - 10 Sep 2009 at 9:09am
IP IP Logged
Jyothi Yepuri
Senior Member
Senior Member


Joined: 11 May 2009
Location: Australia
Online Status: Offline
Posts: 127
Quote Jyothi Yepuri Replybullet Posted: 13 Sep 2009 at 8:56pm
try using Convert(varchar(10),p.date_app_recvd ,101)

HTH,
Jyothi
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.