If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

model sql in framework

Started by jaymoore1756, 10 Sep 2013 11:55:49 PM

Previous topic - Next topic

jaymoore1756

I need setup the following files SG00100M,and SG00160T in framework so that it will produce the same outcome as this sql   ....

SELECT Person.PERSON_NO, Person.PERSON_FNM, Per_Relation.REL_PERSON_NO, P2.PERSON_FNM
  FROM [CaySQL].[cayenta].[SG00100M] as Person
  join [CaySQL].[cayenta].[SG00160T] as Per_Relation on Person.PERSON_NO = Per_Relation.PERSON_NO
  join [CaySQL].[cayenta].[SG00100M] as P2 on Per_Relation.REL_PERSON_NO = P2.PERSON_NO
  --where Person.PERSON_NO = 1398
  Order by Person.PERSON_NO

I have tried to join the files several different ways without success, created a view without success. Any help would be appreciated.Thanks

blom0344

Looks like a perfectly simple join  where SG00160T is joined to SG00100M and again with an alias  of  SG00100M.  In SQL you use a named alias, within the model you create a copy of  SG00100M under another name or an alias short cut  of SG00100M
The order by - of course - does not belong within a model.

jaymoore1756

thanks .. Your info help me rework the joins and they are now functioning properly