Cannot retrieve column in SAP Hana Studio

1.6k Views Asked by At

I am importing a .csv file using HANA studio, this is what my table looks like:

Preview Of Imported Table

This is what my query looks like:

select outage_start from "PIHPJ"."ji_major_storm"

and this is the error message:

SAP DBTech JDBC: [260]: invalid column name: OUTAGE_START: line 1 col 8 (at pos 7)

If I change to upper case:

select OUTAGE_START from "PIHPJ"."ji_major_storm"

I still get this error message:

SAP DBTech JDBC: [260]: invalid column name: OUTAGE_START: line 1 col 8 (at pos 7)

What’s going on??? What am I doing wrong?

1

There are 1 best solutions below

3
Lars Br. On BEST ANSWER

That's a common challenge and there are plenty of questions and answers for it.

In short: if an object has been named with double quotation marks (" ") then the name is not converted to upper case.

To address such objects (tables, columns, views, etc.) it is necessary to use double quotation marks again.

If, for example, the column was named "outage_start", you will have to use the quotation marks and the lower case every time you use this column.

So this:

select "outage_start" from "PIHPJ"."ji_major_storm"

might work in your case.