Re: Help with an ADOCE SQL statement

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: oj (nospam_ojngo_at_home.com)
Date: 01/18/05


Date: Tue, 18 Jan 2005 15:45:38 -0800

1. there is only datetime in sql (getdate()). if you're only interested in
the date portion, you would have to cast/convert it somehow.

SELECT ServiceTicketEntry.*
FROM ServiceTicketEntry
WHERE
convert(varchar,ServiceTicketEntry.Call_Date,112)=convert(varchar,getdate(),112)

2.

SELECT ServiceTicketEntry.* FROM ServiceTicketEntry WHERE
ServiceTicketEntry.ReferenceNum IS NULL

"William" <William@discussions.microsoft.com> wrote in message
news:65DFA784-7F4B-46CB-9CBC-5946FB58D6C2@microsoft.com...
> Hi all,
>
> Could really use some help here. Am developing a database for my company
> using the program Sprint DB Pro which uses ADOCE SQL. Am trying to
> construct
> two simple queries that just will not work.
>
> Query 1:
> I want to find all records where the field Call_Date is equal to the
> system
> date. I tried:
> SELECT ServiceTicketEntry.* FROM ServiceTicketEntry WHERE
> ServiceTicketEntry.Call_Date=SYSDATE()
>
> Query 2:
> I want to find all records where the the field referenceNum is empty. I
> treid:
> SELECT ServiceTicketEntry.* FROM ServiceTicketEntry WHERE
> ServiceTicketEntry.ReferenceNum=""
>
> Can someone please tell me where I am going astray? Thanks much in
> advance.
>
> William
>



Relevant Pages

  • Re: Help with an ADOCE SQL statement
    ... Note that this does NOT include all records for "today", since getdate() ... You will need to do a fancy BETWEEN query of some ... > SELECT ServiceTicketEntry.* FROM ServiceTicketEntry WHERE ... > I want to find all records where the the field referenceNum is empty. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: Help with an ADOCE SQL statement
    ... "William" wrote in message ... > SELECT ServiceTicketEntry.* FROM ServiceTicketEntry WHERE ... > I want to find all records where the the field referenceNum is empty. ...
    (microsoft.public.sqlserver.programming)
  • Help with an ADOCE SQL statement
    ... using the program Sprint DB Pro which uses ADOCE SQL. ... SELECT ServiceTicketEntry.* FROM ServiceTicketEntry WHERE ... I want to find all records where the the field referenceNum is empty. ...
    (microsoft.public.sqlserver.programming)
  • Help with an ADOCE SQL statement
    ... using the program Sprint DB Pro which uses ADOCE SQL. ... SELECT ServiceTicketEntry.* FROM ServiceTicketEntry WHERE ... I want to find all records where the the field referenceNum is empty. ...
    (microsoft.public.windowsce.embedded.vc)