Running the following code on our test DB works fine, but on our live system errors with :
'Server: Msg 8115, Level 16, State 2, Line 1
Arithmetic overflow error converting expression to data type int.'
The code is :
Select
sum(ads_doc_pages.page_size) as 'Space Used',
count(ads_doc_pages.doc_no)as 'Total Pages',
tw_ctgry.ctgryname as 'Category'
From tw_docu0,tw_ctgry,ads_doc_pages
Where tw_docu0.ctgryno = tw_ctgry.ctgryno
and tw_docu0.location = 1088
and tw_docu0.docno = ads_doc_pages.doc_no
Group by tw_ctgry.ctgryname
It does not like the sum function but will only return an 'int'.
How can I 'get around' this ...
Any help most grateful
'Server: Msg 8115, Level 16, State 2, Line 1
Arithmetic overflow error converting expression to data type int.'
The code is :
Select
sum(ads_doc_pages.page_size) as 'Space Used',
count(ads_doc_pages.doc_no)as 'Total Pages',
tw_ctgry.ctgryname as 'Category'
From tw_docu0,tw_ctgry,ads_doc_pages
Where tw_docu0.ctgryno = tw_ctgry.ctgryno
and tw_docu0.location = 1088
and tw_docu0.docno = ads_doc_pages.doc_no
Group by tw_ctgry.ctgryname
It does not like the sum function but will only return an 'int'.
How can I 'get around' this ...
Any help most grateful