Reply to Re: Query: union on self

Your name:

Reply:


Posted by Alexander Kuznetsov on 09/26/61 11:52

You can try something like this:

SELECT qi_id,
case
when qi_injury = 1 then 'Injury'
when qi_environmental = 1 then 'environmental'
when qi_Equipment damage = 1 then 'Equipment damage'
when qi_Vehicle = 1 then 'Vehicle'
end
AS type
FROM qt_ins
WHERE (qi_injury = 1) or (qi_environmental = 1 ) or
(qi_equipment_damage = 1)
or (qi_vehicle = 1)

But it would be interesting to see why is your original query slow. Any
additional infotrmation?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация