Re: VB6/Informix query
Posted in 2000
dg wrote: > > I am writing a SQL statement that is pulling information from a table with a > DATETIME YEAR TO MONTH data type. How do I write the SQL statement in either > VB or Access to test for a value against that field? > > For example: SELECT * from test WHERE mtyr > ?????; > > Is it delimited with #'s, ""'s and what is the format of the data YYYY-MM, > YYYY-DD-MM, etc (after importing into Access, its converted to MM/DD/YYYY, > so I don't understand why I can't use the same format in my query). Make sure your value is in quotes of some sort, otherwise you are simply dividing three numbers by themselves. ;-) Cheers, -- Mark. +----------------------------------------------------------+-----------+ | Mark D. Stock mailto:mdstock@mydas.freeserve.co.uk |//////// /| | http://www.informix.com http://www.informixhandbook.com |///// / //| | http://www.iiug.org +-----------------------------------+//// / ///| | |What year 2000 bug? year 2000 bug? |/// / ////| | |year 2000 bug? year 2000 bug? year |// / /////| | |2000 bug? year 2000 bug? year 1900 |/ ////////| +----------------------+-----------------------------------+-----------+