AnsweredAssumed Answered

Help on NSQL query syntax

Question asked by akort on Jun 15, 2012
Latest reply on Jun 19, 2012 by akort
A plea for help from any NSQL gurus:

I tested my SQL on the Clarity DB to get it ready to make a portlet, and it works fine as SQL. Translating it to NSQL is not working out for me. I am trying to follow the documentation/guides, but Clarity is complaining about errors. Here is my query:


select @SELECT:DIM:USER_DEF:IMPLIED:RESOURCE:c.fullname@,
@SELECT:DIM:USER_DEF:IMPLIED:OBS:x.NAME@
from PRJ_OBS_UNITS x
join
(select @SELECT:DIM:USER_DEF:IMPLIED:RESOURCE:b.FULL_NAME:fullname@,
@SELECT:DIM:USER_DEF:IMPLIED:OBS:a.UNIT_ID:fkid@
from PRJ_OBS_ASSOCIATIONS a join SRM_RESOURCES b
ON a.RECORD_ID = b.ID
where @FILTER@
a.TABLE_NAME = 'SRM_RESOURCES') c
ON c.fkid = x.id

Simply, it extracts a resource and that resource's associated OBS unit.

Clarity is giving an error when I try to construct a "query" from this and press Preview:

"NPT-0103: Error when trying to execute the query. Native message: [CA Clarity][Oracle JDBC Driver][Oracle]ORA-01729: database link name expected SQL Text: select c.fullname@, @SELECT DIM, a.UNIT_ID fkid from PRJ_OBS_ASSOCIATIONS a join SRM_RESOURCES b ON a.RECORD_ID = b.ID where 1=? and 1=1 a.TABLE_NAME = 'SRM_RESOURCES') c ON c.fkid = x.id ."

It seems to blow up after the first column select line

Can anyone tell me what is the error in my syntax? If you need the original SQL, I can provide that.

Outcomes