Quantcast
Channel: SCN : Unanswered Discussions - Semantic Layer
Viewing all articles
Browse latest Browse all 1291

Passing BOUSER into a SQL Server function

$
0
0

Hi all,

 

I wish to pass the BOUSER variable into my SQL function which returns a 2 column table when it is executed. The SQL I have in a derived table is this.

 

SELECT UserID, UserGroupID

FROM   fnRptUserGroupSecurity(@Variable('BOUSER'))

 

However when I validate this SQL in the derived table I get this error message from SQL Server 2014

 

[Microsoft][SQL Server Native Client 11.0][SQL Server]Conversion failed when converting from a character string to uniqueidentifier.

 

The UserID column is of type UNIQUEIDENTIFIER and the parameter that is passed in to the function is of type CHAR(36).

 

Any ideas about how I can get around this error message in IDT as until it is validated I cannot see the columns in the dervied table to be able to join on them in the .dfx?

 

Thanks,

Christian


Viewing all articles
Browse latest Browse all 1291

Trending Articles



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