Skip to Content
0

create virtual table in sql

May 14 at 02:42 PM

34

avatar image

hi

i want to create virtual table in sql (excel adapter)

i try this CREATE VIRTUAL TABLE "S00"."AJHGG" AT "excel2"."customer_files.xlsx"."Feuil1"; but not work

I want to be able to create virtual tables in a dynamic way and for that I would need to know if we can recover to browse a hana table with a loop in order to retrieve the names


sda.png (6.1 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Jeff Kresse
May 14 at 03:35 PM
0

Here is the documentation for creating virtual tables with SQL: https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/2.0.02/en-US/d2a0406155f24a49aa6c549e0c428bd7.html

What is the error that you get when you try to run your statement?

You might try not specifying the DB name and owner, instead use null there:

  • CREATE VIRTUAL TABLE "S00"."AJHGG" AT "excel2"."NULL"."NULL"."customer_files.xlsx.Feuil1";

Thanks,

Jeff K

Show 1 Share
10 |10000 characters needed characters left characters exceeded

hi thanks for your answers but i have this error message " 09:16:18 (SQL Editor) Could not execute 'CREATE VIRTUAL TABLE "S00"."A" AT "excel2"."NULL"."NULL"."customer_files.xlsx.Feuil1"' Error: (dberror) 476 - invalid remote object name: NullPointerException while processing request "SDA Request for ExcelAdapter of type MDS_IMPORT": line 0 col -1 (at pos 0)"

0
Muhammad BENNAFLA May 15 at 07:17 AM
0

hi

thanks for your answers but i have this error message

" 09:16:18 (SQL Editor) Could not execute 'CREATE VIRTUAL TABLE "S00"."A" AT "excel2"."NULL"."NULL"."customer_files.xlsx.Feuil1"'

Error: (dberror) 476 - invalid remote object name: NullPointerException while processing request "SDA Request for ExcelAdapter of type MDS_IMPORT": line 0 col -1 (at pos 0)"

Show 3 Share
10 |10000 characters needed characters left characters exceeded

OK so that syntax probably won't work for Excel adapter. What was the error message with the original SQL you were using?

0

please give me a link for download the Excel adapter

0

I do not understand "What was the error message with the original SQL you were using?"

0