Home » Developer & Programmer » Forms » Item with last transactional date
Item with last transactional date [message #613778] Mon, 12 May 2014 04:48 Go to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi all,

SELECT illitm, 
       ildoc, 
       ildct, 
       iltrdj 
FROM   crpdta.f4111 
WHERE  iltrdj IN (SELECT Max(iltrdj) 
                  FROM   crpdta.f4111); 



The above query is returning the latest transaction date with Item details.
But expected output is: Every Item with last transactional date.

Hope I am clear on the above requirement please.

Thanks in advance.
Re: Item with last transactional date [message #613779 is a reply to message #613778] Mon, 12 May 2014 04:53 Go to previous messageGo to next message
Littlefoot
Messages: 21805
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If I understood the question, inline view lacks in WHERE clause, such as
SELECT f.illitm, 
       f.ildoc, 
       f.ildct, 
       f.iltrdj 
FROM   crpdta.f4111 f
WHERE  f.iltrdj IN (SELECT Max(iltrdj) 
                    FROM   crpdta.f4111 f1
                    WHERE  f1.illitm = f.illitm
                   ); 
Re: Item with last transactional date [message #613782 is a reply to message #613779] Mon, 12 May 2014 05:15 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Thanks Littlefoot ... Smile
Re: Item with last transactional date [message #613788 is a reply to message #613779] Mon, 12 May 2014 05:29 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi Littlefoot ,The above modified which is keep on running and never throwing any output.
Re: Item with last transactional date [message #613790 is a reply to message #613788] Mon, 12 May 2014 05:41 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi Littlefoot Its keeps on running like indefinite loop... Smile
Once again Thanks
Re: Item with last transactional date [message #613792 is a reply to message #613790] Mon, 12 May 2014 06:34 Go to previous messageGo to next message
Littlefoot
Messages: 21805
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Copy your last query over here. Do not type it, copy/paste it.
Re: Item with last transactional date [message #613795 is a reply to message #613792] Mon, 12 May 2014 06:54 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Sorry for the lately inform to you

SELECT illitm,
ildoc,
ildct,
iltrdj
FROM crpdta.f4111
WHERE iltrdj IN (SELECT Max(iltrdj)
FROM crpdta.f4111);

[Updated on: Mon, 12 May 2014 06:58]

Report message to a moderator

Re: Item with last transactional date [message #613798 is a reply to message #613795] Mon, 12 May 2014 07:02 Go to previous messageGo to next message
Littlefoot
Messages: 21805
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't know what to say ... actually, I do, but I'd rather not.
Re: Item with last transactional date [message #613804 is a reply to message #613798] Mon, 12 May 2014 07:54 Go to previous message
cookiemonster
Messages: 13915
Registered: September 2008
Location: Rainy Manchester
Senior Member
Does that look anything like what LF suggested?
Or does it look like what you posted in the first place?

Previous Topic: GIS for Oracle
Next Topic: which query to use in push button trigger to auto execute when i pressed button
Goto Forum:
  


Current Time: Mon Mar 18 21:46:24 CDT 2024