Tim,

See my response to Justin, I simply get an error back:

     Error Desc = Error #206 (Operand type clash: ntext is incompatible with 
datetim)

How the heck do we query a timestamp field dynamically, this just seems much 
more difficult than it should be.


Steve

*********************************************
  Stephen J. Orth                                                
  The Aquila Group, Inc.         Office:  (608) 834-9213
  P.O. Box 690                           Mobile:  (608) 347-6447
  Sun Prairie, WI 53590

  E-Mail:  [email protected]
*********************************************


-----Original Message-----
From: Timothy Penner [mailto:[email protected]] 
Sent: Tuesday, July 10, 2018 3:09 PM
To: [email protected]; '4D iNug Technical' <[email protected]>
Subject: RE: SQL Statement Assistance

That looks like the field is just plain text; have you tried just removing the 
extra single quotes from the text variable in your initial example (Justin Will 
also suggested this)?

vt_temp1:="04/06/2018 07:58:00 AM"
vt_temp2:="04/06/2018 08:01:00 AM"
Begin SQL
                       SELECT RecordID, Mach_ID, Energy_1, Energy_2, Energy_3
                       FROM DMM_TTX_HISTORIAN
                       WHERE TimeStamp >= :vt_temp1
                       AND TimeStamp <= :vt_temp2
                       INTO :al_temp1, :at_temp1, :ar_temp1, :ar_temp2, 
:ar_temp3
End SQL


-Tim




Timothy Penner
Senior Technical Services Engineer

4D Inc
95 S. Market Street, Suite #240
San Jose,CA 95113
United States

Telephone: +1-408-557-4600
Fax:       +1-408-271-5080
Email:     [email protected]
Web:       www.4D.com


**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to