2025 Feb 11 2:55 PM - edited 2025 Feb 11 2:56 PM
Hello,
I'm creating a SQL-based View in Datasphere. I have a requirement to create multiple versions from the same record I'm looping over. I have inititalized a table variable to hold my result and have created a cursor over my source table. Based on each iteration, I manually create the tuple that I would like to insert as my new record. The issue that I'm facing is appending to my result table. I want to overwrite my result table as the union of itself with the new record, but the syntax check fails as a "from" clause is expected implying that I have to use a table. I know that what I'm trying to achieve is possible on other DBs and SQL flavors but cannot seem to find the equivalent on HANA. Any ideas? I have attached a screenshot of the code snippet.
Thanks!
Request clarification before answering.
Hello,
I have not tested this logic in Datasphere, but in other systems (e.g. BW/4) you select from dummy table. See example in the following blog:
https://community.sap.com/t5/technology-blogs-by-sap/use-of-dummy-table-for-mocking-and-testing-logi...
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.