× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Try the select alone, it sounsd like an overflow. You can use "having sum(entint) > 9" to list only the bigger ones.

Vance Stanley wrote:

Hi,

  What would an SQL statement look like that is doing an insert into an 
existing table with
numeric fields? The catch is the selected data is being summed before being 
inserted.
 My query looks something like this:

INSERT INTO @BPDSPFW SELECT PRPRTY,PRPSUB,PRPDES,PRODYR,PRODMO,SUM(ENTINT) FROM LIB990/GBPDSPF GROUP BY PRPRTY,PRPSUB,PRPDES,COANL,VNAME02,PRODYR,Prodmo The message I get back (Conversion error on assignment to column ENTINT.) indicates that the Summed field is not correct for the target. In response to the message I
modified the query using the decimal statement:
INSERT INTO @BPDSPFW SELECT PRPRTY,PRPSUB,PRPDES,PRODYR,PRODMO,decimal(SUM(ENTINT),9,8) FROM LIB990/GBPDSPF GROUP BY PRPRTY,PRPSUB,PRPDES,COANL,VNAME02,PRODYR,Prodmo
This yielded the same error.

Any thoughts?

Note: The target field ENTINT has a total length of 9 with 8 to the right of 
the decimal.

Thanks,
Vance




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.