Jimmy Christian · Apr 18, 2019

Running a SQL SELECT statement in USER NAMESPACE to get data from another NAMESPACE


I am trying to run a simple SELECT STATEMENT in USER NAMESPACE.

SELECT * FROM projectname.table

What is the syntax if i need to get data for a table in another namespace eg. SAMPLES., SYS

SELECT * FROM SAMPLES.projectname.table  is not working.

Thanks in advance.

Jimmy Christian.

4 1 9 514
Log in or sign up to continue



You need to map the other Global database into your namespace. This is the only way to have visibility of other database

Thank you all. At this time, i will not be able to map the USER db to rest of it. But i will try to call support .

Please, you have to map the class too. It is into Routine database.

Check previously what is the Global name to map it.

You need to map both data global and class package.

Thank you all. Only reason i have to do it is because i cannot import the csv file data into my table in USER namespace using IMPORT WIZARD. Wizard is not working and throwing CSP error.

I will try and see if i am able to map the class and package. and then run the query i need to extract the data. Thank you

If the C++ binding is installed you could/should be able to use a %RemoteResultSet object to accomplish what you're wanting to do.  I've never done so myself so I can't confirm from experience.