Quantcast
Channel: SCN: Message List - Select distinct values - Script Logic
Viewing all articles
Browse latest Browse all 4

Re: Select distinct values - Script Logic

$
0
0

Hi Leandro,

 

What I did not understand here is that why do you want "DISTINCT" keyword on your ID. ID, by itself is the primary key and no 2 records will have same IDs. So, ID itself is DISTINCT.

 

However, coming to the requirement, you can definitely do a distinct within the select statement, something like:

 

*SELECT(%MYVAR%,[YEAR],"CATEGORY",YEAR in (SELECT DISTINCT [YEAR1] FROM dimCategory) )

*XDIM_MEMBERSET TIME = %MYVAR%

 

This is just an example and is a valid statement. You can use this as per your requirement. You can combine different conditions in your statement.

 

Hope this helps.


Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>