BookmarkSubscribeRSS Feed
rohithverma
Obsidian | Level 7

on day one i have data like as below

sno debit credit chequeid vdate
1 200 0 1234 01-jan-2020
2 200 0 1234 01-jan-2020
3 400 0 4567 01-jan-2020
4 400 0 4567 01-jan-2020
5 400 0 4567 01-jan-2020
6 600 0 6789 01-jan-2020

and on day 2 i have data like this as appended to day 1 data the final input as

sno debit credit chequeid vdate
1 200 0 1234 01-jan-2020
2 200 0 1234 01-jan-2020
3 0 200 1234 02-jan-2020
4 400 0 4567 01-jan-2020
5 400 0 4567 01-jan-2020
6 400 0 4567 01-jan-2020
7 0 400 4567 02-jan-2020
4 600 0 6789 01-jan-2020

So the final output i required is

dataset1

sno debit credit chequeid vdate flag
1 200 0 1234 01-jan-2020 matched
2 0 200 1234 02-jan-2020 matched
3 400 0 4567 01-jan-2020 matched
4 0 400 4567 02-jan-2020 matched

dataset2

sno debit credit chequeid vdate flag
1 200 0 1234 01-jan-2020 open
2 400 0 4567 01-jan-2020 open
3 400 0 4567 01-jan-2020 open

Please do the needfull

Thanks in advance

ance

1 REPLY 1
PaigeMiller
Diamond | Level 26

Please don't make us guess. Please tell us the logic that takes the raw data and produces output data set 1 and ouptut data set 2.

--
Paige Miller

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 270 views
  • 0 likes
  • 2 in conversation