on 02-20-2013 8:11 AM
Hello Experts,
I have a script based calc view and i have two columns in the 'var_out' table.
One of these fields is the input to the view, say int_id and the other field is the ext_id, which is calculated by the logic in the script.
I try to insert these values directly to the table but I get an error - "could not find table/view var_out in the <schema that I am using>"
What am I doing worng? I tried with creating a local table and then adding values, but nothing works!
Thanks,
Arpita
Hi Arpita
You're not doing anything wrong. In SQLScript you just can't directly insert/upsert/delete/update data referenced by a table variable.
What you could do instead - if you really feel you need to - is to either employ the CE_UNION operator or to use temporary tables explicitly.
- Lars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lars,
I want to do this -
int_id = a (which is the input)
ext_id = b (which is calculated)
Now, I want to insert these values to var_out
Even if I use CE_UNION, I would need these values as a table row.
So I created a table and then tried to do a select on it for assigning to var_out.
But I get error - DML is not allowed in read only view etc...
Thanks,
Arpita
Hi Arpita,
It would be good if you can post your code here.
Based on the assumption that your input value int_id and second value ext_id are single values, you can try something like
var_out = select :int_id, :ext_id from dummy;
Please note that this will not work if int_id and ext_id are multi value fields (like columns, tables etc). Hence your code will help understand the requirement better.
Regards,
Ravi
Hi Ravi,
Yes, it would be my fault
Its a null pointer exception.. may be because i didn't declare 'dummy' !
I can not edit until I open the view. It is not getting copied also.
I don't have the code anywhere else, so can't try with a new object
If it helps, the message is -
java.io.IOException: com.sap.ndb.studio.sdk.resource.base.exception.ResourceException: java.io.IOException: Error loading object, refer to Repository Log for more information
com.sap.ndb.studio.sdk.resource.base.exception.ResourceException: java.io.IOException: com.sap.ndb.studio.sdk.resource.base.exception.ResourceException: java.io.IOException: Error loading object, refer to Repository Log for more information
at com.sap.ndb.studio.sdk.resource.repository.core.impl.MDResourceController.getModelObject(MDResourceController.java:170)
at com.sap.ndb.studio.sdk.resource.repository.core.impl.AbstractResourceController.validate(AbstractResourceController.java:1336)
at com.sap.ndb.studio.sdk.resource.repository.core.impl.ResourceManager.runValidationRules(ResourceManager.java:472)
at com.sap.ndb.studio.sdk.resource.repository.core.impl.ResourceManager.activateAll(ResourceManager.java:303)
at com.sap.ndb.studio.modeler.job.type.activate.ActivateJob.activateObjects(ActivateJob.java:116)
at com.sap.ndb.studio.modeler.job.type.activate.ActivateJob.run(ActivateJob.java:90)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.io.IOException: com.sap.ndb.studio.sdk.resource.base.exception.ResourceException: java.io.IOException: Error loading object, refer to Repository Log for more information
at com.sap.ndb.studio.sdk.resource.repository.core.impl.AbstractResourceController.load(AbstractResourceController.java:608)
at com.sap.ndb.studio.sdk.resource.repository.core.impl.MDResourceController.load(MDResourceController.java:647)
at com.sap.ndb.studio.sdk.resource.repository.core.impl.MDResourceController.getModelObject(MDResourceController.java:167)
... 6 more
Caused by: com.sap.ndb.studio.sdk.resource.base.exception.ResourceException: java.io.IOException: Error loading object, refer to Repository Log for more information
at com.sap.ndb.studio.sdk.resource.repository.core.impl.MDResourceController.deserializeRepositoryFile(MDResourceController.java:638)
at com.sap.ndb.studio.sdk.resource.repository.core.impl.AbstractResourceController.load(AbstractResourceController.java:601)
... 8 more
Caused by: java.io.IOException: Error loading object, refer to Repository Log for more information
at com.sap.ndb.studio.sdk.resource.base.DBRepositoryURIConverter.createInputStream(DBRepositoryURIConverter.java:130)
at com.sap.ndb.studio.sdk.resource.base.DBRepositoryURIConverter.createInputStream(DBRepositoryURIConverter.java:65)
at com.sap.ndb.studio.sdk.resource.repository.MDResource.load(MDResource.java:156)
at com.sap.ndb.studio.sdk.resource.repository.core.impl.MDResourceController.loadMainResource(MDResourceController.java:264)
at com.sap.ndb.studio.sdk.resource.repository.core.impl.MDResourceController.deserializeRepositoryFile(MDResourceController.java:635)
... 9 more
Thanks alot!
Arpita
Hi Arpita,
You don't need to declare dummy as it is a standard object (like dual in Oracle). Can you please try to right click on the object in the navigator pane and select "Revert to Active". Please let me know if it works.
If it is a script based Calc view, it is always good to copy the code to notepad file and paste it in the script. 🙂
Regards,
Ravi
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.