Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Left outer join, "date" field not stored as date Post Reply Post New Topic
Author Message
carstowal
Groupie
Groupie


Joined: 31 Jul 2008
Online Status: Offline
Posts: 80
Quote carstowal Replybullet Topic: Left outer join, "date" field not stored as date
     Posted: 05 Aug 2015 at 8:37am
JD Edwards doesn’t use dates, it uses a modified Julian date which is basically useless. The way to get a date from the stored data is by a formula: {@OrderDateAsDate} =
DateAdd ("d",({table2.field} mod 1000)-1, DATE((1900+INT({table2.field }/1000)),1,1)) (

Table1 is in an excel worksheet
I want all {table1.partno} from Excel


I only want data from JDE that falls within a data range based on the formula date, which is not a linkable field. {@OrderDateAsDate} >= DateTime (2015, 01, 01, 00, 00, 00)

how can I return a row containing the table2.partno when no data falls within the date range?

Obviously left outer join doesn’t work, ISNULL doesn’t work. (I don’t want to return all the data and hide the rows falling outside the date range. I have too many summaries and running totals I’d have to write formulas to only sum/min/max/avg/etc the data in the date range.)

I’m not allowed to create views of the JDE database the SQL Server.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 06 Aug 2015 at 9:08am
Do a left outer join from the worksheet to the data table.

Then, in the Select Expert, use a formula like this:

(
IsNull({table2.partno}) or
{@OrderDateAsDate} >= DateTime (2015, 01, 01, 00, 00, 00)
)

If you have any other selection criteria, you MUST use the parentheses that I've bolded around the outside of the statement.

-Dell
IP IP Logged
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