-1

How to get columns with error in HANA View

Hi,

I'm trying to create a table based on an HANA calculation view and I'm using the following statement:

create column table "SCHEMA"."TABLE" as (select * from "_SYS_BIC"."PACKAGE.SUBPACKAGE/CALCULATION_VIEW" )

I'm getting the following error

Could not execute 'SELECT * FROM "_SYS_BIC"."PACKAGE.SUBPACKAGE/CALCULATION_VIEW"'

SAP DBTech JDBC: [339]: invalid number: not a valid number string '' at function to_int()

When I preview data of my calculation view it seems work correctly

How can I get the wrong column?

Thank you

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Jun 01, 2017 at 07:04 PM

    I tried your syntax pattern using one of my calculation views and it definitely works and created a new table, so I think something else is wrong, will try a more complicated calculation view:

    create column table <name> as ( select * from <calculation view> )

    Kind regards,

    Dot

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 02, 2017 at 05:25 AM

    Hi Antonio, two things that I'm wondering, what types are the columns of your calculation view and do you have any aggregations that could be occurring that could be causing an conversion to a number so that a sum could be carried out. For e.g. an aggregation on an NVARCHAR column. Do you have anything like that defined in the Semantics of your calculation view?

    Kind regards,

    Dot

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 02, 2017 at 05:27 AM

    Because of no more details in your question I would assume that the used calculation view has a calculated column which converts a string to a number. The error in CREATE COLUMN TABLE statement will occur in case a string value cannot be converted to a number. The preview using the data preview functionality for the calc. view will work in case the restricted preview data set has not record with a value which cannot be converted to a number.

    Are you able to share more details about your calc. view, if there are calculated columns, e.g. with conversions, and if the underlying columns have valid values?

    Regards,
    Florian

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 14, 2017 at 10:34 PM

    Hi guys, thank for your replies, there was an error on the calculation view, but I had the error only when I created the new table based on the calculation view, during the data preview functionality I didn't have any error so I didn't know there was a problem.

    Thank you

    Add comment
    10|10000 characters needed characters exceeded

Skip to Content