Skip to Content

create virtual table in sql

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • May 14 at 03:35 PM

    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

    Add comment
    10|10000 characters needed 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)"

  • May 15 at 07:17 AM

    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)"

    Add comment
    10|10000 characters needed characters exceeded