on 07-02-2015 5:03 PM
Hi,
First of all pardon me for this silly query.
I am getting some strange output.
Input:
COL1 | COl2 | MATNR |
TECH111 | A11111 | MATERAL1 |
TECH111 | A11112 | MATERAL2 |
TECH111 | A11112 | MATERAL3 |
TECH111 | A11113 | MATERAL4 |
TECH111 | A11113 | MATERAL5 |
TECH112 | A11114 | MATERAL6 |
TECH112 | A11115 | MATERAL7 |
TECH112 | A11116 | MATERAL8 |
Query:
select "COL1",max("COl2") from "BEST"."matnr_count"
group by "COL1";
Expected Output:
COL1 COL2
TECH111 A11113
TECH112 A11116
Output Coming:
COL1 COL2
TECH111 A11113
TECH111 A11112
TECH112 A11116
BR
Sumeet
I Suspect the data 'TECH111' . Are you sure there is no space in both sides of the text? Re check the data once. And , if still issue persist , delete the records 'A1113' ( 2 rows) and re insert it. Then have a try ( all these steps just because i doubt the data )
Execute the below and check it.
select COL1 , LENGTH(COL1) from <.......>;
Sree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.