+ 1

Why am I getting a "missing expression" error?

I want to select the unique values of a column named Department and print the length of each value. Here is the query I wrote to do the above task: SELECT LENGTH(DISTINCT(DEPARTMENT)) FROM WORKER; But I'm getting a "missing expression" error while running it.

28th Sep 2020, 2:41 PM
Anurag Mondal
Anurag Mondal - avatar
5 odpowiedzi
+ 2
Try this... SELECT LENGTH(DISTINCT DEPARTMENT) FROM WORKER;
28th Sep 2020, 2:45 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 2
Anurag Mondal which programming language you are using to connect to SQL?
29th Sep 2020, 7:13 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 1
Let me try this.. wait
28th Sep 2020, 3:32 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 1
AKSHAY I'm not using any programming language..just running the query in the database gui frontend. oracle 10g
30th Sep 2020, 3:27 PM
Anurag Mondal
Anurag Mondal - avatar
0
AKSHAY still not working..same error
28th Sep 2020, 3:25 PM
Anurag Mondal
Anurag Mondal - avatar