cancel
Showing results for 
Search instead for 
Did you mean: 

A query to create sales information for a specific date.

Former Member
0 Kudos

Hi,

Please look at attached image, you will see how this query look like. This query will generate all sales from 1/1/2014 until today. I would like to see if the query can create the sales report for a range from 1/1/2014 until yesterday (does not included any sales for today). Any help will be appreciated.

-Bill

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Bill,

The query attached looks like it is selecting results based on the salesorder name starting with the current year. As is written, it won't be able to filter out today.

If you want to exclude today, you'll need to modify the current selectivity predicate for today to perhaps a BETWEEN predicate ( e.g. table.datefield BETWEEN '2014-01-01' and DATEADD(day,-1,GETDATE()) ) or add an exclusion predicate ( e.g. table.datefield <> DATEADD(day,-1,GETDATE()) ).

Note that you'll need to have a field in the data that has the day. Your query does not have any schema information, and all it seemingly reveals is that a salesorder name starts with the current year.

Hope this helps,

Tyson

Answers (0)