30 Sep
2013
30 Sep
'13
1:11 p.m.
the workaround for this appears to be > dbGetQuery( db , "select sum( CAST( ( CAST( bene_sex_ident_cd = 1 AS INTEGER ) ) AS DOUBLE ) ) / CAST( count( * ) AS DOUBLE ) as pct_male from x11" ) but needing to do this is new as of SP4.. is there a reason why, and could this be fixed? thank you :) On Mon, Sep 30, 2013 at 8:42 AM, Anthony Damicowrote: > this issue is new for SP-4 ..i have been using this syntax for a long time > and never encountered this problem until the upgrade :( > > > > dbGetQuery( db , "select ( sum( ( bene_sex_ident_cd = 1 ) ) ) / ( count( > * ) ) as pct_male from x11" ) > pct_male > 1 0 > > dbGetQuery( db , "select ( sum( ( bene_sex_ident_cd = 1 ) )*1.000 ) / ( > count( * )*1.000 ) as pct_male from x11" ) > Error in .local(conn, statement, ...) : > Unable to execute statement 'select ( sum( ( bene_sex_ident_cd = 1 ) > )*1.000 ) / ( count( * )*1.000 ) as pct_male from x11'. > Server says 'too many digits (19 > 18)' [#22003]. > > > > > what diagnostics can i run for you to troubleshoot this? thanks!! :) >