1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
select test1||test2||...||test20
from(
select
case when SUBSTR(codefamille,1,1) not in ('a','b','c','d','e','f','g','h','i','j','k','l','m'
,'n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M'
,'N','O','P','Q','R','S','T','U','V','W','X','Y','Z','1','2','3','4','5','6','7','8','9',' ','-','/') then ''
else SUBSTR(libclassprod3,1,1)
end as test1
,
case when SUBSTR(codefamille,2,1) not in('a','b','c','d','e','f','g','h','i','j','k','l','m'
,'n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M'
,'N','O','P','Q','R','S','T','U','V','W','X','Y','Z','1','2','3','4','5','6','7','8','9',' ','-','/') then ''
else SUBSTR(libclassprod3,2,1)
end as test2
,
...
,
case when SUBSTR(codefamille,20,1) not in ('a','b','c','d','e','f','g','h','i','j','k','l','m'
,'n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M'
,'N','O','P','Q','R','S','T','U','V','W','X','Y','Z','1','2','3','4','5','6','7','8','9',' ','-','/') then ''
else SUBSTR(codefamille,20,1)
end as test20
from famille
where codefamille=234) |
Partager