Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
programs:odxsql:commands:assignvalues [2009/07/16 22:04]
admin created
programs:odxsql:commands:assignvalues [2012/10/26 14:57] (current)
Line 1: Line 1:
 ====== ASSIGNVALUES ====== ====== ASSIGNVALUES ======
  
-ASSIGNVALUES is used to assign an undetermined set of values contained in a buffer ($VALUES) to be used as selection criteria in a SQL select statement. The $VALUES buffer can contain a single value or an array of values.+===== Description =====
  
-Support for the WITH options clause was added for future releases. There are currently no options available for use with ASSIGNVALUES.+ASSIGNVALUES ​is used to assign an undetermined set of values contained in a buffer ($VALUES) to be used as selection criteria in a SQL select statement.  
 + 
 +The $VALUES buffer can contain a single value or an array of values.
  
 Searches using ASSIGNVALUES are not optimized for MDK access. Searches using ASSIGNVALUES are not optimized for MDK access.
Line 14: Line 16:
  
    
-Syntax+===== Syntax ​=====
  
-ASSIGNVALUES <​value|(value[,​value...])>​[TO label][ON [CURSOR] cursor][WITH options]+ 
 +  ​ASSIGNVALUES <​value|(value[,​value...])>​ 
 +      ​[TO label] 
 +      ​[ON [CURSOR] cursor] 
 +   
  
 ASSIGNVALUES ASSIGNVALUES
 Required Required
  
-value | (value[,​value...])+== value | (value[,​value...]) ​== 
 Required - Either a single value or a comma separated value list enclosed in parenthesis. These are the values to be used as criteria in a SELECT statement. Required - Either a single value or a comma separated value list enclosed in parenthesis. These are the values to be used as criteria in a SELECT statement.
  
-[TO label]+== [TO label] ​== 
 Optional - Give a name to the buffer containing the values to be used as criteria. This is most useful when using more than one set of values. Optional - Give a name to the buffer containing the values to be used as criteria. This is most useful when using more than one set of values.
  
-[ON [CURSOR] cursor] +== [ON [CURSOR] cursor] ​==
-Optional - Specify which cursor is to be used for this command. If omitted, the current cursor will be used. The "​CURSOR"​ keyword is optional.+
  
-[WITH options] +Optional - Specify ​which cursor is to be used for this command. If omitted, the current cursor will be used. The "​CURSOR"​ keyword is optional.
-Optional - Specify ​options ​to be used for this command.+
  
    
-Options 
  
-There are currently no options available use with ASSIGNVALUES. Support for the WITH options clause was added for future enhancements.+===== Examples =====
  
-  
-Example 
  
-In ODXSQL, the AUTOFETCH setting must be set to OFF prior to using ASSIGNVALUES.+In OdxSQL, the AUTOFETCH setting must be set to OFF prior to using ASSIGNVALUES.
  
   >set AUTOFETCH=OFF   >set AUTOFETCH=OFF
Line 55: Line 58:
 Multiple $VALUES assignments can be used in a single select by giving each a label. Multiple $VALUES assignments can be used in a single select by giving each a label.
  
-     >​select company, contact from customers where state in $values(2,,,'​VAL1'​) and city in $values(4,,,'​VAL2'​) +     > select company, contact from customers where state in $values(2,,,'​VAL1'​) \  
-     >​assignvalues ('​CO','​CA'​) to VAL1 +       (cont) and city in $values(4,,,'​VAL2'​) 
-     >​assignvalues ('​BOULDER','​DENVER','​LOS ANGELES','​SAN FRANCISCO'​) to VAL2 +     > assignvalues ('​CO','​CA'​) to VAL1 
-     >​fetch all+     > assignvalues ('​BOULDER','​DENVER','​LOS ANGELES','​SAN FRANCISCO'​) to VAL2 
 +     > fetch all
  
    
  
   
- 
- 
- 
 
Back to top
programs/odxsql/commands/assignvalues.1247781844.txt.gz · Last modified: 2012/10/26 14:53 (external edit)