I have a table in a database that contains the following columns:
1. ID (automatically generated)
2. Month/Year (contains month and year such as "Aug 2011")
3. Day (such as "Sunday")
4. Date (such as "28")
5. RealDate (such as "Sun 28 Aug 2012")
The first three columns were created by the orginal user of the daterbase, I know not why, as they have to be entered separately and cannot be used for sorting
I have inserted column 4 manually which is just a real date.
What I now want to do is to ensure that the RealDate column contains the same date as in colums 2, 3 and 4. As only one column contains a date the comparison must be doen on a text basis
So I need an expression in a query to see if the data held in columns 1, 2 and 3.
So I need I need an expression which is like "if =((column 5) contains (column 2) and (column 3) and column 4)) then"OK" else "Error"
Or I could concatenate columns 2, 3 and 4 and then compare with 5 but I would have to ensure that the layout of both colum was exactlt the same.
I have seen the Like criteria, such as Like "*2012*" but the number here varies from record to record. What I would need is Like "*Column 3*"
Can this be done without too much effort?
1. ID (automatically generated)
2. Month/Year (contains month and year such as "Aug 2011")
3. Day (such as "Sunday")
4. Date (such as "28")
5. RealDate (such as "Sun 28 Aug 2012")
The first three columns were created by the orginal user of the daterbase, I know not why, as they have to be entered separately and cannot be used for sorting
I have inserted column 4 manually which is just a real date.
What I now want to do is to ensure that the RealDate column contains the same date as in colums 2, 3 and 4. As only one column contains a date the comparison must be doen on a text basis
So I need an expression in a query to see if the data held in columns 1, 2 and 3.
So I need I need an expression which is like "if =((column 5) contains (column 2) and (column 3) and column 4)) then"OK" else "Error"
Or I could concatenate columns 2, 3 and 4 and then compare with 5 but I would have to ensure that the layout of both colum was exactlt the same.
I have seen the Like criteria, such as Like "*2012*" but the number here varies from record to record. What I would need is Like "*Column 3*"
Can this be done without too much effort?
Last edited: