[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] fetch value in array
- Subject: RE: [sqr-users] fetch value in array
- From: prashanth reddy <bpreddy78@yahoo.com>
- Date: Fri, 6 Jan 2006 10:07:55 -0800 (PST)
- Delivery-date: Fri, 06 Jan 2006 13:10:18 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com;h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding;b=k0z9Ak1N/cS3dK4ZXdUunfXqubL5KyV326vZm1TOmK6v/vP2Ej5MwI4Dn7Z1e1BXzG4byAiblAvWDB5XxGD3kbWx7t/yXxz9ZAGMpB5yi6UzCYp12aUygRtY8nIEuAth/Cwg9Rosg9AJxSvLcObdoeyXMaRK648NMj4KrJ/7sio=;
- In-reply-to: <E8629566E0BAC048A35B31BC78AF4C480242E358@excmb01.backup>
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
Thanks for the reply..
I'm getting data from flat file not from table. Thats
the reason I'm using array. What I'm doing is reading
data from flat file, validating emplid in ps_job
record, if emplid doesn't exist in job record, emplid
and max count should show on report.
Thanks,
Prashanth
--- Bob Stone <bstone@fastenal.com> wrote:
> wow. convoluted example....nice use of the same 3
> letters all caps for
> 5 different employees...real readable.
>
> So, I'm going to pretend the first guy is ABC,
> second is LMN, and third
> is XYZ. Or maybe we got Jones, Smith, and Grady.
> ...XYZ ZYX YZX YXZ,
> not so good.
>
> select *
> from YOURTABLE a
> where (a.emplid, a.company, a.count) in
> (select b.emplid, b.company, b.count from
> yourtable b
> where a.emplid = b.emplid and a.company =
> b.company
> and b.count = ( select max(c.count) from
> YOURTABLE c where
>
> b.emplid = c.emplid and
> b.company = c.company)
>
> Is there an easier way? probably. do you have to
> join 3 times? maybe
> not. It's just what I would try.
>
>
> -----Original Message-----
> From:
> sqr-users-bounces+bstone=fastenal.com@sqrug.org
>
[mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]
> On Behalf Of
> prashanth reddy
> Sent: Friday, January 06, 2006 10:43 AM
> To: sqr-users@sqrug.org
> Subject: [sqr-users] fetch value in array
>
> Hi,
>
> I'm using array in sqr and data in array looks like
> this:
>
> Emplid Company Count
> XYZ A 1
> XYZ A 2
> XYZ A 3
> YXZ B 1
> YXZ B 2
> YXZ B 3
> ZYX A 1
> YZX B 1
>
> >From this array I'm supposed to get max count for
> each
> emplid, i.e for emplid XYZ have to get line 3 (XYZ
> A
> 3), for emplid YXZ (YXZ B 3) and for emplid ZYX
> (ZYX
> A 1).
>
> When i compare row value, I'm not able to get the
> correct results.
> Any help or suggestion would be appreciated.
>
> Thanks,
> Prashanth
>
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
>
__________________________________________
Yahoo! DSL – Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users