Difference between revisions of "SQLVALUES()"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=SQLVALUES()=
 
 
 
==Class==
 
Data Connectivity
 
 
 
 
==Purpose==
 
==Purpose==
 
Function to return the single row result of an SQL statement
 
Function to return the single row result of an SQL statement
Line 15: Line 8:
  
 
==See Also==
 
==See Also==
[[AVERAGE]], [[COUNT]], [[SUM]], [[TOTAL]], [[AMAX()]], [[AMIN()]], [[AVGVALUES()]], [[CNTVALUES()]], [[MAX()]], [[MAXVALUES()]], [[MIN()]], [[MINVALUES()]], [[SUMVALUES()]]
+
[[CONNECTED()]], [[GATEWAY()]], [[LOGIN]], [[LOGOUT]], [[MODIFY GATEWAY]], [[SET GATEWAY]]
  
  
Line 36: Line 29:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital, Recital Server
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:Remote Data Connectivity]]
 +
[[Category:Remote Data Connectivity Functions]]
 +
[[Category:SQL]]

Latest revision as of 11:55, 22 June 2010

Purpose

Function to return the single row result of an SQL statement


Syntax

SQLVALUES(<SQL statement>)


See Also

CONNECTED(), GATEWAY(), LOGIN, LOGOUT, MODIFY GATEWAY, SET GATEWAY


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 can only be used with an active gateway connection.


Example

login "Oracle","node","user","Password"
// Count the number of records in the employee table
cTotal = sqlvalues("SELECT COUNT(*) FROM emp")
total=val(cTotal)
// Count the number of records in the employee table matching the key "Mr"
cTotal = sqlvalues("SELECT COUNT(*) FROM emp WHERE title = 'Mr'")


Products

Recital, Recital Server