listopad 7th, 2007
By wygenerować ciąg liczb np. od 1 do 10 w SQL mozna użyć hierachicznego ( CONNECT BY ) zapytania do wewnętrznej tablicy DUAL:
select rownum n from dual connect by level <= 10;
Dla dat:
select trunc(sysdate)+rownum-1 n from dual connect by level <= 10;
I znaków:
select chr(ascii('A')+rownum-1) n from dual connect by level <= 10;
Należy pamietać, że powyższe zapytanie z klauzulą connect by zwraca tylko 100 rekordów niezależnie od warunku ( np. level <= 1000 )
Posted in PL, Oracle, Tip | No Comments »
październik 26th, 2007
Posted in PL, Oracle, Tip | No Comments »
październik 24th, 2007
Posted in PL, Oracle | No Comments »
październik 24th, 2007
Posted in PL, Oracle, Tip | No Comments »
październik 11th, 2007
Posted in PL, Oracle, Tip | No Comments »
październik 11th, 2007
Posted in PL, Oracle, Tip | 1 Comment »
październik 9th, 2007
Posted in PL | No Comments »
wrzesień 28th, 2007
Posted in PL, Oracle | 2 Comments »
wrzesień 28th, 2007
Posted in PL, Oracle, Tip | No Comments »
wrzesień 20th, 2007
Posted in PL, Oracle | No Comments »