On Wed, Nov 5, 2008 at 6:34 PM, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Javier Chávez B. escribió: > >> UPDATE ttamlice SET licservicio = '02' WHERE liccateg in( '04','05','06') >> UPDATE ttamlice SET licservicio = '03' WHERE liccateg in( '01','02','03') > > Mejor todavia: > > update ttamlice set licservicio = case > when liccateg in ('04', '05', '06') then '02' > when liccateg in ('01', '02', '03') then '03' > end > where liccated in ('01, '02', '03', '04', '05', '06')
Mas elegante de echo :0) > -- > Alvaro Herrera Valdivia, Chile ICBM: S 39º 48' 55.3", W 73º 15' 24.7" > "Digital and video cameras have this adjustment and film cameras don't for the > same reason dogs and cats lick themselves: because they can." (Ken Rockwell) > -- Cumprimentos jchavez linux User #397972 on http://counter.li.org/ -- TIP 9: visita nuestro canal de IRC #postgresql-es en irc.freenode.net