I am trying to pass the following to the SQL v7 server
IF CurrentDate > date(year(currentdate),04,01)
then {CPCASE.DOFF} in date(year(currentdate),04,01) to date(year(currentdate)+1,03,31)
else {CPCASE.DOFF} in date(year(currentdate)-1,04,01) to date(year(currentdate),03,31)
{CPCASE.DOFF} is my date field
Whenever I 'Show SQL Query...' there is no mention of the data range to query on. Therefore, from what I can see it brings back every record to sort on my PC. I have been trying to use case logic in the select expert to pass the date range to the server. I am using
select {CPCASE.DOFF}
case CurrentDate > date(year(currentdate),04,01) : {CPCASE.DOFF} in date(year(currentdate),04,01) to date(year(currentdate)+1,03,31)
default : {CPCASE.DOFF} in date(year(currentdate)-1,04,01) to date(year(currentdate),03,31)
but keep finding that a date-time is required at the first currentdate. I have tried creating a date formula which just contains 'currentdate', and using this in place of currentdate - but still the same results.
Am I fighting a loosing battle with this?
Lewis
United Kingdom
IF CurrentDate > date(year(currentdate),04,01)
then {CPCASE.DOFF} in date(year(currentdate),04,01) to date(year(currentdate)+1,03,31)
else {CPCASE.DOFF} in date(year(currentdate)-1,04,01) to date(year(currentdate),03,31)
{CPCASE.DOFF} is my date field
Whenever I 'Show SQL Query...' there is no mention of the data range to query on. Therefore, from what I can see it brings back every record to sort on my PC. I have been trying to use case logic in the select expert to pass the date range to the server. I am using
select {CPCASE.DOFF}
case CurrentDate > date(year(currentdate),04,01) : {CPCASE.DOFF} in date(year(currentdate),04,01) to date(year(currentdate)+1,03,31)
default : {CPCASE.DOFF} in date(year(currentdate)-1,04,01) to date(year(currentdate),03,31)
but keep finding that a date-time is required at the first currentdate. I have tried creating a date formula which just contains 'currentdate', and using this in place of currentdate - but still the same results.
Am I fighting a loosing battle with this?
Lewis
United Kingdom