cancel
Showing results for 
Search instead for 
Did you mean: 

How to increase field dimension in HANA

Former Member
0 Kudos

Hi Experts,

I have got couple of doubts in HANA ,Please  clarify my doubts ., I will assign points for you .

a) How to change fields dimension in HANA ? is it possible to increase dimension of fields ,when table contain data ?

    I am loading  Customer table from flat files ,after loading couple of records, I need to extend or change  field dimension to load another set of data in       that same table

b) How to delete only  content of table in SAP HANA?

c) What happened if we load same set of data  number of times ? or duplicate records in HANA?

Regards.

hari

Accepted Solutions (1)

Accepted Solutions (1)

former_member184768
Active Contributor

.. Quite simple questions.. Just caught my eye while browsing for something else..

a) How to change fields dimension in HANA ? is it possible to increase dimension of fields ,when table contain data ? I am loading  Customer table from flat files ,after loading couple of records, I need to extend or change  field dimension to load another set of data in that same table

Ans: ALTER TABLE table_name ALTER (my_column current_datatype(new_dimension_value));

ALTER TABLE tt_table ALTER (my_col1 nvarchar(30));

b) How to delete only  content of table in SAP HANA?

two options: DELETE FROM table_name <where_condition> -- deletes data based on where condition

or TRUNCATE TABLE <table_name>; -- deletes all the records.

c) What happened if we load same set of data  number of times ? or duplicate records in HANA?

Didn't understand.. it will create duplicate records. What do you expect ?

Ravi

Former Member
0 Kudos

Hi Ravindra,

thanks for your reply .

So we can change field dimension and delete table content only with SQL statement.

is there any options in SAP GUI to achieve those functions when data in the table.As I understand we can change field dimensions when table empty.

Regards,

Hari

former_member182302
Active Contributor
0 Kudos

From HANA Studio, you can click on "Definition" on the tabe you want to edit and then goto context menu and click on "edit".

It should allow you to add/remove new columns.

But for datatype changes you will have to use SQL.

Regards,

Krishna Tangudu

Answers (0)