Type mismatch problem

Поиск
Список
Период
Сортировка
От Michael Rowan
Тема Type mismatch problem
Дата
Msg-id 563BB114-63E9-485C-B999-6BCE9224636B@internode.on.net
обсуждение исходный текст
Ответы Re: Type mismatch problem  (Philip Couling <phil@pedal.me.uk>)
Re: Type mismatch problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
As a total beginner who has for decades used an application that would allow type mismatches like boolean*numeric I
triedthe following select: 

SELECT sum(cost*quantity)*(sales_type=1) AS sales_type1, sum(cost*quantity)*(sales_type=2) AS sales_type2 FROM etc etc

In the above, cost and quantity are TYPE numeric(9,2), sales_type is smallint.

PostgreSQL does not allow numeric*boolean.  The error message ends with "You might need t"  which kinda leaves me
hanging.

Any clues would be most welcome.


Michael Rowan
mike.rowan@internode.on.net

11 Kingscote Street
ALBERTON
South Australia 5014

tel 618 8240 3993




В списке pgsql-novice по дате отправления:

Предыдущее
От: Kevin Duffy
Дата:
Сообщение: Re: error on start up "could not change directory to"
Следующее
От: Philip Couling
Дата:
Сообщение: Re: Type mismatch problem