Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8914

Writing an sql script to query a calculation view and an attribute view inside a calculation view

$
0
0

Hi,

I was trying to query a calculation view with sql , and as one of the input parameters i was trying to give a query over an attribute view

So my sql will look like this

 

SELECT * FROM "MyApp.calculation_views::GET_CHECKLIST_FOR_ACCOUNT"('PLACEHOLDER' = ('$$ACCOUNT_ID$$', '1','$$CHECKLIST_ID$$',' SELECT CHECKLIST_ID FROM "MyApp"."CHECKLIST_PRODUCTS" WHERE PRODUCT_ID = 5'));

 

So as an input to $$CHECKLIST_ID$$   i wanted to give an id selected from checklist products table where products id is passed as an input

 

but this is not working, i am getting syntax error at the $$CHECKLIST_ID$$ there i can only pass values like  $$CHECKLIST_ID$$, '1'

Please help me to figure out which  is the correct syntax  i tried putting the sql statement to get the checklist_id in '' but it too didnot work


Viewing all articles
Browse latest Browse all 8914

Trending Articles



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