Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select max(n) + 1 as letra_sig from (select
- case when substring(t.nro_ht from 11) = '' or substring(t.nro_ht from 11) similar to '[A-Z]' then 0
- when substring(t.nro_ht from 11) is not null or substring(t.nro_ht from 11) not similar to '[A-Z]' then substring(t.nro_ht from 11)::int end
- as n
- from tbl_hojatramite t where substring(t.nro_ht,1,9) ='201945098' order by n) as tbl_copias
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement