Posted by Hero Wanders on 11/11/21 11:17
Hello!
> I am unable to find the proper function to get the following.
> I have 2 cells with date and time in a table. I have to check if the
> combination of given date & time exists in the table before a new record is
> inserted.
> Any idea what function will do this?
I assume you are speaking about a DB table.
Try to check whether the resultset you get when querying the DB with
SELECT * FROM myTable WHERE (date = given_date) AND (time = given_time);
If the resultset is empty there is no such record.
Perhaps you want to use a PRIMARY KEY(date, time).
Greets,
Hero Wanders
Navigation:
[Reply to this message]
|