Hi
I have data like below I want distinct values only of fields (Emp_1,Emp_2,Emp_3,Emp_4) i.e E01,E02,E03,E04
using Sql Query
Customer Emp_1 Emp_2 Emp_3 Emp_4
001 E01 E02
002 E03 E04 E02
Thanks
Answers (1)
Hi
I have data like below I want distinct values only of fields (Emp_1,Emp_2,Emp_3,Emp_4) i.e E01,E02,E03,E04
using Sql Query
Customer Emp_1 Emp_2 Emp_3 Emp_4
001 E01 E02
002 E03 E04 E02
Thanks
Answers (1)
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sophia CarterRank #4,018 · 371 reputationPosted Apr 4, 2025, 5:58 AM EDT
Hi! To obtain distinct values for fields Emp_1, Emp_2, Emp_3, and Emp_4 from your data, you can use the SQL query with the DISTINCT keyword. Here's how you can achieve this:
SELECT DISTINCT Emp_1 FROM YourTableName; SELECT DISTINCT Emp_2 FROM YourTableName; SELECT DISTINCT Emp_3 FROM YourTableName; SELECT DISTINCT Emp_4 FROM YourTableName;By running these queries, you will retrieve unique values for each of the specified fields from your dataset. This approach ensures that you only get distinct values for each column individually.
If you run these queries against your data, you will get the unique values E01, E02, E03, and E04 for each respective field. Let me know if you need further assistance or clarification on this!