Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ibn-al-haytam
Starting Member
5 Posts |
Posted - 2010-10-01 : 17:34:23
|
| hiplease help in thisi have probleme with count and i wont help pleasei have three table :flight ,flight details and airplaneflight and flightdetails are joined based on their flightID,flight and airplane are joined based on their airplaneIDI want a list that displays the average loadof aircrafti wrote the folowing query : select avion.av#,avion.capacite,vol.vol#,convert(decimal(2,0),count(affectevol.passager)/avion.capacite*100)+'%'as'taux du remplissage moyen'from affectevol join vol on affectevol.vol=vol.vol#join avion on vol.avion=avion.av#group by avion.av#,vol.vol#the compiler did not accepte it |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-10-02 : 02:56:06
|
| one thing i found is you're trying to concatenate string to decimal field. so you might have cast the decimal value to varchar before doing that. But question why you want to change the datatype for showing %? its a presentation issue and should be dealt at the front end------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|