Desktop productivity for business analysts and programmers

Compare different values in different columns

Reply
N/A
Posts: 1

Compare different values in different columns

Heelo everybody,

I'm trying to compare different values in different columns by another columns.

Let me explain:

Through the KEY variable, I want the sas code take the first COD_PEÇA and scan in CD_ITEM variable flag as "S" the variable FLAG whenever it finds a repeated (whatever put the "S" in the first line or last as long as put once)

Example

By KEY ="X"

FIRST LINE -> first COD_PECA = "a" and CD_ITEM = " " THEN flag = "N";

.

.

LAST LINE -> first COD_PECA = "a" and CD_ITEM = "a" THEN flag = "S";

Imagem inline 1

Make sense?

Thanks!!

Ask a Question
Discussion stats
  • 0 replies
  • 155 views
  • 0 likes
  • 1 in conversation