AnsweredAssumed Answered

convert sql to nsql

Question asked by EricRod on May 21, 2013
Latest reply on May 30, 2013 by EricRod
I have a simple query that works in SQL Server that I'd like to convert to nSQL. I'm having difficulty and was hoping someone could help me.

This is the SQL

select prjst.ODF_PARENT_ID, prjst.NAME, prjst.cop_report_date, *
from niku.ODF_CA_COP_PRJ_STATUSRPT prjst

This is the nSQL that I tried to create, but I realize that I don't fully understand the use of the dimension. In the query preview, this generates the error "NPT-0113: The dimension status has more than one key specified". I originally had all the select attribues with a dimension "status", then I changed the project id to "project" thinking that would get rid of the error.

select @select:dim:user_def:implied:project:prjst.ODF_PARENT_ID:ProjectID@,
@select:dim:user_def:implied:status:prjst.NAME:PrjStatusName@,
@select:dim:user_def:implied:status:prjst.cop_report_date:PrjStatusDt@
from niku.ODF_CA_COP_PRJ_STATUSRPT prjst

Outcomes