ali şahin
asked on
I want to bring number values under names.
hi expert
I wrote a query like this
select DRADI.ADI_SOYADI as namee,count(*) as count_x from protokol,dradi where PROTOKOL.DR_KODU=DRADI.DR_ KODU group by DRADI.ADI_SOYADI
the output of this query is as follows.
Şule ŞİMŞEK 5440
Check Up Polikliniği 847
Aslıhan Çakır 38
Furkan KARALOĞLU 4
Yıldız EKMEKÇİ 1267
I want to set the given names as columns.
I want to bring number values under names.
the template I want is below
Şule ŞİMŞEK Check Up Polikliniği Aslıhan Çakır Furkan KARALOĞLU Yıldız EKMEKÇİ
5440 847 38 4 1267
how can I do that.?
thanks
I wrote a query like this
select DRADI.ADI_SOYADI as namee,count(*) as count_x from protokol,dradi where PROTOKOL.DR_KODU=DRADI.DR_
the output of this query is as follows.
Şule ŞİMŞEK 5440
Check Up Polikliniği 847
Aslıhan Çakır 38
Furkan KARALOĞLU 4
Yıldız EKMEKÇİ 1267
I want to set the given names as columns.
I want to bring number values under names.
the template I want is below
Şule ŞİMŞEK Check Up Polikliniği Aslıhan Çakır Furkan KARALOĞLU Yıldız EKMEKÇİ
5440 847 38 4 1267
how can I do that.?
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thnks a lot :)
what could I do if the number of person was too high?
What would happen if the number of people was between 100 and 300?
what could I do if the number of person was too high?
What would happen if the number of people was between 100 and 300?
I don't know where / if there is a limit on the number of names that you could have. But if you had 100 names, how would that output be "useful", since it would be way to long to view or print in the horizontal format it would represent? Are you trying to accomplish something else?
»bp
»bp
ASKER
you are right.
ı mustn't print more than 10 data horizontally.it doesn't make much sense.
I just wondered
thank you so much :)
ı mustn't print more than 10 data horizontally.it doesn't make much sense.
I just wondered
thank you so much :)
https://www.oracle.com/technical-resources/articles/database/sql-11g-pivot.html
The problem is that you need to know the MAXIMUM number of columns you can have before doing it.