October 14, 2014 at 7:50 am
Thanks guys resolved.
October 14, 2014 at 7:53 am
How did you fix it in the end?
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
October 14, 2014 at 12:00 pm
It hasn't actually resolved because now anything in base is showing as a base currency.
I put the G/L as a left join and anything I had in the where clause related to the G/L table was included in the joining clause rather than where but now it seems to give anything in base currency a null value.
Any suggestions?
October 14, 2014 at 11:00 pm
imran.shah (10/14/2014)
It hasn't actually resolved because now anything in base is showing as a base currency.I put the G/L as a left join and anything I had in the where clause related to the G/L table was included in the joining clause rather than where but now it seems to give anything in base currency a null value.
Any suggestions?
Yes. Post some sample data that exhibits the problem as previously suggested. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
October 15, 2014 at 3:10 am
Hi Jeff,
Should I re-format my code with comments and upload? or upload how the sample report now appears?
Thanks
October 15, 2014 at 3:42 am
Have a look the example below.
create table #EventHeader(
HistoryIDint primary keynot null
,DateTimeHappened datetimenot null
)
create table #EventDetail
(
HistoryIDint
,DetailIDint primary key not null
,DateTimeProcessed datetimenot null
,ProcessedBy varchar(20)not null
)
insert into #EventHeader
select 100001, '2014-07-23 08:50:00.123' union all
select 100002, '2014-07-23 08:51:00.123' union all
select 100003, '2014-07-23 08:52:00.123' union all
select 100004, '2014-07-23 08:53:00.123' union all
select 100005, '2014-07-23 08:54:00.123' union all
select 100006, '2014-07-23 08:55:00.123' union all
select 100007, '2014-07-23 08:56:00.123' union all
select 100008, '2014-07-23 08:57:00.123' union all
select 100009, '2014-07-23 08:58:00.123' union all
select 100010, '2014-07-23 08:59:00.123'
insert into #EventDetail
select 100001,200001, '2014-07-23 08:50:07.123','System1' union all
select 100001,200002, '2014-07-23 08:50:08.123','System2' union all
select 100001,200003, '2014-07-23 08:54:09.123','APerson' union all
select 100002,200004, '2014-07-23 08:51:07.123','System1' union all
select 100002,200005, '2014-07-23 08:51:08.123','System2' union all
select 100002,200006, '2014-07-23 08:57:09.123','APerson' union all
select 100003,200007, '2014-07-23 08:52:08.123','System1' union all
select 100003,200008, '2014-07-23 08:52:07.123','System2' union all
select 100003,200009, '2014-07-23 08:59:09.123','APerson' union all
select 100004,200010, '2014-07-23 08:53:07.123','System1' union all
select 100004,200011, '2014-07-23 09:00:09.123','APerson' union all
select 100005,200012, '2014-07-23 08:54:07.123','System1' union all
select 100006,200013, '2014-07-23 08:55:08.123','System1' union all
select 100007,200014, '2014-07-23 08:56:09.123','System1' union all
select 100008,200015, '2014-07-23 08:57:07.123','System1' union all
select 100009,200016, '2014-07-23 08:58:08.123','System1' union all
select 100010,200017, '2014-07-23 08:59:09.123','System1'
select distinct
eh.HistoryID
,min(ed.DateTimeProcessed) over (partition by eh.HistoryId)
from
#EventHeader eh
join #EventDetail ed on ed.HistoryID = eh.HistoryID
drop table #EventHeader, #EventDetail
What we'd like you to do is post some data in that kind of format so we can more easily see what is wrong. You don't need to include your actual data just something that looks like it. It will make it much easier to see the problem. Please read the article I posted earlier too.
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
October 15, 2014 at 4:39 am
Hi Guys,
Cracked it, report is working fine.
Thanks
October 15, 2014 at 7:10 am
What was the fix?
Chris Powell
George: You're kidding.
Elroy: Nope.
George: Then lie to me and say you're kidding.
Viewing 8 posts - 16 through 22 (of 22 total)
You must be logged in to reply to this topic. Login to reply