Re: Help with an ADOCE SQL statement
From: oj (nospam_ojngo_at_home.com)
Date: 01/18/05
- Next message: SQL Apprentice: "Re: user permission to run job only"
- Previous message: Hugo Kornelis: "Re: Strange bug, hard to reproduce - is it known?"
- In reply to: William: "Help with an ADOCE SQL statement"
- Messages sorted by: [ date ] [ thread ]
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
>
- Next message: SQL Apprentice: "Re: user permission to run job only"
- Previous message: Hugo Kornelis: "Re: Strange bug, hard to reproduce - is it known?"
- In reply to: William: "Help with an ADOCE SQL statement"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|