Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a requirement to get only distinct values in all the columns.
Example:
S.NO | Name | Standard |
1 | Yoga | 1 |
2 | Yoga | 2 |
3 | Yoga | 3 |
4 | Nantha | 1 |
5 | Nantha | 3 |
6 | Prakash | 2 |
7 | Prakash | 1 |
I want to load S.NO 1,2,3,4,5,6,7 Name Yoga,Nantha,Prakash and Standard 1,2,3
How to load only distinct fields for all the columns.
Can anyone help me
Regards,
Yoganantha Prakash G P
What is the expected result?
What is your expected output? When you load the above table as is and use list box it will display all the distinct values for their respective columns. What is the issue?
My expected result is like this which have distinct values in all the three columns
S.NO | Name | Standard |
1 | Yoga | 1 |
2 | Nantha | 2 |
3 | Prakash | 3 |
4 | ||
5 | ||
6 | ||
7 |
I want it while loading itself not to use in listbox or table box
Hi,
This will automatically happen when you download
Hi Yoganantha,
You could use:
SNo:
LOAD DISTINCT S.NO
FROM
[Source.xlsx]
(ooxml, embedded labels, table is Sheet);
Name:
LOAD DISTINCT Name
FROM
[Source.xlsx]
(ooxml, embedded labels, table is Sheet);
Standard:
LOAD DISTINCT Standard
FROM
[Source.xlsx]
(ooxml, embedded labels, table is Sheet);
This would leave you with three unrelated tables with just the distinct values for S.NO, Name and Standard.
ronalddoes is right, you can use that but the result will be unrelated tables, cause the concept of distinct is about line and not collum.
For that reason if you use Distinct in your code nothing will change about your output, once that all line in your already unique.