/scripts/ahub.form.attachments.js
-1

How to get columns with error in HANA View

Jun 01, 2017 at 11:44 AM

138

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

avatar image
Former Member Jun 01, 2017 at 07:04 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jun 02, 2017 at 05:25 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Florian Pfeffer
Jun 02, 2017 at 05:27 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Antonio Sanseverino Jun 14, 2017 at 10:34 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Skip to Content