Options

"Conversion from string to number failed due to overflow with value" error

I am trying to execute an "Insert Into " query which fails with the following error message 
"[Vertica][Support] (50110) Conversion from string to number failed due to overflow with value: "

I find the error message strange as none of the columns being inserted are strings and also it seems the data load is not rolled back even after the query encounters the error. Any pointers here ?

Comments

  • Options
    Navin_CNavin_C Vertica Customer
    Hello Shubhro,

    Can you elaborate your issue, with some examples

    Thanks
  • Options
    Here is the query that I am trying to execute :

    insert   into TableA(
     ID1
    ,ID2
    ,ID3
    ,ID4
    ,ID5
    ,Amount
    ,Trips
    ,NtileAmt
    ,NtileTrips
    ,NtileAmt100
    ,WeekStartDT_MIN
    ,WeekStartDT_MAX
    ,InsertDate
    )
    select 
     ID1
    ,ID2
    ,ID2
    ,ID2
    ,ID2
    , sum(amount) as amount
    , sum(trips) as trips
    , NTILE(5) OVER (PARTITION BY ID2 ORDER BY  sum(amount) AS NtileAmt
    , NTILE(5) OVER (PARTITION BY ID2 ORDER BY sum(trips),  sum(amount) AS NtileTrips
    , NTILE(100) OVER (PARTITION BY ID2 ORDER BY  sum(amount) AS NtileAmt100
    , min(WeekStartDT) as WeekStartDT_MIN
    , max(WeekStartDT) as WeekStartDT_MAX
    , getdate() as InsertDate 
    from ViewA 
    group by 1,2,3,4,5;


    All IDs are integers and the source dataset in ViewA is about 25 billion rows. The query bombs out with the "[Vertica][Support] (50110) Conversion from string to number failed due to overflow with value: " error. However it does seem it has loaded data into TableA. 


    Shubhro
  • Options
    Hi ,
    Check if you able to run CTAS statment and not insert as select , this will isolate if the problem is on the view or in the  target table . 
  • Options
    Eli - That one worked ! Thanks for your help :)

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file