Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Due to some maintenance operations, stambia.org will be switched to read-only mode during the 13th November. It will be possible to read and download, but impossible to post on the forums or create new accounts. For any question please contact the support team.

Topic-icon Question Using SQL to create a VAR - How to get the physical name ?

More
19 Aug 2019 16:44 #1 by Virginie_Samson
Virginie_Samson created the topic: Using SQL to create a VAR - How to get the physical name ?
Hello
I tried different syntaxes to variabalise the catalogue name on a SQL Query.

stambia.org/doc/87-development-hints-and...able-s-refresh-query
In this example, i don't understand what Ref mean ? Where does it comes from ?
select CASE WHEN CURRENT_DATE NOT IN
(select DATE_AFFRAN from
{Ref:schema()/tech:physicalName()}..EDIT_SYDES_STATISTIQUES )
THEN TRUE ELSE FALSE END

I also tried the metho we use in a Process:
select CASE WHEN CURRENT_DATE NOT IN
(select DATE_AFFRAN from
%x{$EDIT_SYDES_STATISTIQUES/tech:physicalPath()}x% )
THEN TRUE ELSE FALSE END

Both case are used in a Variable, type Boolean, and RefreshValue, call in a Process with a Variable Manager.
Thanks for your help

Virginie
More
28 Aug 2019 11:03 #2 by Thomas BLETON
Thomas BLETON replied the topic: Using SQL to create a VAR - How to get the physical name ?
Important : ref:schema() should be in lowercase, because Xpath is case sensitive.
So Ref:schema() will not work ;)

"ref" is just a prefix, indicating that the schema() function will return a reference (a pointer) to the object.
In this case, it will be a Reference to the schema specified in the Refresh Connection of the Variable metadata.