sql - Analog of "select level from dual connect by level < 10" for Sybase? -


by select level dual connect level < 10 in oracle can generate sub-query of integer , transform sequence.

is possible sybase?

ps want find dates no data in table (missing days). in oracle as:

select to_date('2012-01-01', 'yyyy-mm-dd')+level-1 dual     connect level < to_date('2013-01-01', 'yyyy-mm-dd') - to_date('2012-01-01', 'yyyy-mm-dd')   minus select distinct date tbl     date between to_date('2012-01-01', 'yyyy-mm-dd')                    , to_date('2013-01-01', 'yyyy-mm-dd') 

in sybase analog minus is:

select whatever table1 t1   not exists   ( select 1 table2 id = t1.id ) 

but don't know analog connect level...

update there way create temporary table in sybase without storing data disk?

the oracle syntax use hierarchical query used row generator. sybase has sa_rowgenerator system procedure can used generate set of integers between start , end value.

the following produce column of integers between 1 , 255.

select row_num sa_rowgenerator( 1, 255 ); 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -