Difference between revisions of "SQLVALUES()"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) |
||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to return the single row result of an SQL statement | Function to return the single row result of an SQL statement | ||
− | |||
==Syntax== | ==Syntax== | ||
SQLVALUES(<SQL statement>) | SQLVALUES(<SQL statement>) | ||
− | |||
==See Also== | ==See Also== | ||
− | [[ | + | [[SQL SELECT|SELECT]] |
− | + | ||
==Description== | ==Description== | ||
The SQLVALUES() function executes the <SQL statement> and returns the result as a string. The required <SQL statement> cannot return multiple rows. If a SELECT statement is specified it must be a singleton select. | The SQLVALUES() function executes the <SQL statement> and returns the result as a string. The required <SQL statement> cannot return multiple rows. If a SELECT statement is specified it must be a singleton select. | ||
− | |||
− | |||
− | |||
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
− | + | open database southwind | |
− | + | cTotal = sqlvalues("select count(*) from orders") | |
− | cTotal = sqlvalues(" | + | |
− | + | ||
− | + | ||
− | + | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | |||
− | |||
[[Category:SQL]] | [[Category:SQL]] |
Revision as of 11:32, 10 December 2012
Contents
Purpose
Function to return the single row result of an SQL statement
Syntax
SQLVALUES(<SQL statement>)
See Also
Description
The SQLVALUES() function executes the <SQL statement> and returns the result as a string. The required <SQL statement> cannot return multiple rows. If a SELECT statement is specified it must be a singleton select.
Example
open database southwind cTotal = sqlvalues("select count(*) from orders")