SQL Queries - CAST Knowledge Base - Queries on User Project - How to get User Project ID

Purpose of Query

This page describes a query for getting the User Project ID.

Applicable CAST Version

ReleaseYes/No
8.3.x
8.2.x
8.1.x

Applicable RDBMS

RDBMSYes/No
Oracle Server
Microsoft SQL Server
CSS2

Query

 SELECT p.IdPro ,
       k.KeyNam,
       t.IdTyp ,
       t.TypNam
FROM   (SELECT DISTINCT op.IdPro
       FROM             ObjPro op
       
       UNION
       
       SELECT DISTINCT a.IdPro
       FROM            Acc a
       )
       p
       JOIN Keys k
       ON     k.IdKey = p.IdPro
       AND    k.ObjTyp NOT IN (306,
                               527)
       JOIN Typ t
       ON     t.IdTyp = k.ObjTyp;

Query result example

503;“PBTester”;73;“VB_PROJECT_EXE”
453;“DLLTester”;73;“VB_PROJECT_EXE”

Query result interpretation

The Project User ID is given in the first parameter. In the above example, it is 503 for the project PBTester and 453 for the project DLLTester

Notes/comments

Related Pages