Q+E: Example of WHERE Clause with COMMAND FunctionLast reviewed: November 4, 1994Article ID: Q79797 |
SUMMARYWhen using the WHERE clause with the COMMAND function in Q+E for Microsoft Excel, the string referenced by the WHERE clause must be enclosed in two sets of double quotation marks.
MORE INFORMATIONConsider the following examples:
A1: chan=INITIATE("QE","system") A2: =EXECUTE(chan,"[open('select * from sqlserver | dbo.authors where upper(au_lname)=''RINGER''')]") A3: =TERMINATE(chan) A4: =RETURN() A1: chan=INITIATE("QE","system") A2: =EXECUTE(chan,"[command(1,'[open(''select * from')]") A3: =EXECUTE(chan,"[command(2,'sqlserver | dbo.authors')]") A4: =EXECUTE(chan,"[command(3,'where upper(au_lname)=""RINGER""'')]')]") A5: =TERMINATE(chan) A6: =RETURN()In the first example, the string referenced by the WHERE clause is enclosed in two sets of single quotation marks, and the SELECT statement is enclosed in one set of single quotation marks. The second example requires that the string referenced by the WHERE clause be enclosed in two sets of double quotation marks in order for the SELECT statement to be enclosed in two sets of single quotation marks. Reference(s): "Q+E for Microsoft Excel User's Guide," version 3.0, pages 89-90, 101-102, 115-159
|
KBCategory: kbother
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |