cancel
Showing results for 
Search instead for 
Did you mean: 

How to get row count when extracting ?

Former Member
0 Kudos

Hi experts

how to get row count when extracting ?

------------ ext.sql (bof)-------------

set temporary option temp_extract_name1='/data/a.dat'

set temporary option temp_extract_column_delimiter='|';

select * from tab_a;

------------- (eof) -----------------------

dbisql -nogui ext.sql 2>&1>ext.sql.log

tab_a has 100 rows but (0 rows) is printed to ext.sql.log

I want to get printed row count to standard output.

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

tayeb_hadjou
Advisor
Advisor
0 Kudos

Hi,

The message "0 rows" is the #rows returned to client.

When extract is specified, #rows is always 0.

I'm not aware if there is an option to control this, however you can use

- a query select count before extract option setting and redirect it to ext.sql.log.

- and confirm in local machine with wc unix command  "wc -l '/data/a.dat' >> ext.sql.log "

Regards,

Tayeb.

Answers (0)