Question Jimmy Christian · Apr 18, 2019

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

Hello,

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.

Comments

Kurro Lopez · Apr 18, 2019

Hi,

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

0
Jimmy Christian  Apr 23, 2019 to John Matson

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 .

0
Kurro Lopez  Apr 18, 2019 to Jimmy Christian

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

Check previously what is the Global name to map it.

0
Eduard Lebedyuk  Apr 18, 2019 to Kurro Lopez

You need to map both data global and class package.

0
Jimmy Christian  Apr 18, 2019 to Eduard Lebedyuk

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

0
Neerav Verma  Apr 23, 2019 to Jimmy Christian

Call support. Its a known bug

0
John Matson · Apr 22, 2019

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.

0