5 pts.
 Error when translating execute immediate from Oracle to SQL
SSMA warning messages: * O2SS0356: Conversion from NUMBER datatype can cause data loss. BEGIN FETCH emp INTO @emps$emp_name, @emps$emp_id IF @@FETCH_STATUS = -1 BREAK IF @emps$emp_name = 'Avi' /* * SSMA error messages: * O2SS0013: EXECUTE IMMEDIATE statement was converted into EXEC(...) statement, but dynamic string was not converted. It must be converted manually. * EXECUTE (@upd) */ DECLARE @db_null_statement int END

Software/Hardware used:
ASKED: September 9, 2008  7:31 AM
UPDATED: August 16, 2010  7:57 PM

Answer Wiki:
Do a CAST on the emps$emp_id from an integer to a text string before putting it into the @upd variable.
Last Wiki Answer Submitted:  September 9, 2008  8:31 am  by  Denny Cherry   64,520 pts.
All Answer Wiki Contributors:  Denny Cherry   64,520 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

how to handle data loss?

when we convert number to float the scale values many get truncated. if the numeric decimal truncation in not a matter then we can ignore the warnings.

 10 pts.

 

Then don’t use float. Use NUMERIC(P,S) instead. If you need 5 numbers to the right of the decimal and 5 to the left use NUMERIC(10,5).

 64,520 pts.