Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customer 47: Use @rid in SQL Function #2161

Closed
j5bot opened this issue Mar 25, 2014 · 1 comment
Closed

Customer 47: Use @rid in SQL Function #2161

j5bot opened this issue Mar 25, 2014 · 1 comment
Assignees

Comments

@j5bot
Copy link

j5bot commented Mar 25, 2014

I am a commercial support customer (#47) and I am experiencing problems using @Rid in an SQL function.

When I attempt to write a function where @Rid=$param is part of the WHERE clause, the function returns an empty result set.

example function:

{"@type":"d","@rid":"#7:9","@version":4,"@class":"OFunction",
"code":"select from V where @rid=$param",
"parameters":["param"],
"language":"SQL","idempotent":true,"name":"fromrid"}

I have tried with @rid.asString() with the same result.

example function:

{"@type":"d","@rid":"#7:10","@version":4,"@class":"OFunction",
"code":"select from V where @rid.asString()=$param","parameters":["param"],
"language":"SQL",
"idempotent":true,"name":"fromridAsString"}
@lvca
Copy link
Member

lvca commented Mar 26, 2014

You should pass the RID without #. This works:

select from V where @rid = :param

@lvca lvca closed this as completed Mar 26, 2014
@lvca lvca assigned lvca and unassigned enisher Mar 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants