Date: Tue, 8 May 2007 13:07:17 -0700
Reply-To: naveen <naveen.badugu@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: naveen <naveen.badugu@GMAIL.COM>
Organization: http://groups.google.com
Subject: Re: Audit Listing
In-Reply-To: <1178653217.814868.191440@u30g2000hsc.googlegroups.com>
Content-Type: text/plain; charset="us-ascii"
This is a Clintrial database which contains (_data & _audit tables for
each page)
t1_audit: audit trial of t1_data table
rec_id col1 col2 col3 change_reason modified_dt
1001 xx yyy zzz entry-error 11-May-06
1001 xx1 yyy zzz modify 12-May-06
1001 xx1 yy1 zzz verification 13-May-06
t1_data: Current data
rec_id col1 col2 col3 change_reason modified_dt
1001 xx1 yy1 zzz verification 13-May-06
Reqd output:
rec_id col_changed old_value new_value change_reason modify_dt
1001 Col1 xx xx1 modify 12-May-06
1001 Col2 yyy yy1 verification 13-May-06
Using UNION descending in Proc sql does not provide all the values
from both tables.
I can only provide the above at this stage. Basically it is a dynamic
transpose listing requirement with the tricky part being the
col_changed column.
sbarry@sbbworks.com wrote:
> On May 8, 3:29 pm, naveen.bad...@gmail.com wrote:
> > dataset1:
> > rec_id col1 col2 col3 change_reason modified_dt
> > 1001 xx yyy zzz entry-error 11-May-06
> > 1001 xx1 yyy zzz modify 12-May-06
> > 1001 xx1 yy1 zzz verification 13-May-06
> >
> > Reqd output dataset:
> > rec_id col_changed old_value new_value change_reason modify_dt
> > 1001 Col1 xx xx1 modify 12-May-06
> > 1001 Col2 yyy yy1 verification 13-May-06
> >
> > Using UNION in Proc sql does not give all rows.
>
> Need to see complete SAS code and preferably the pasted SASLOG output
> for inspection and feedback, otherwise it's a guessing game for
> response.
>
> Scott Barry
> SBBWorks, Inc.