question

TowhidaArif-8356 avatar image
0 Votes"
TowhidaArif-8356 asked BertZhoumsft-7490 commented

Scheduling to run data for previous days

How can I code to run my query to return data:

Monday for Thursday visits
Tuesday for Friday visits
Wednesday for Monday visits
Thursday for Tuesday visits
Friday for Wednesday visits

sql-server-transact-sql
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

For this type of query, we recommend that you post the CREATE TABLE statement for your table(s) and INSERT statements with sample data, and then the expected result given the sample. We are also helped by having a short description of the business rules that explains why you want that result.

Without that information, anything you will get will be the result of a guessing game. Please remember that we don't know your tables, and nor can we read your mind. To get help with queries in these forums, you need to explain your problem clearly.

1 Vote 1 ·

Hi,@TowhidaArif-8356

People won't get useful information just from what you show . Does it need special treatment for weekends ? How accurate is the date format ? In order to help you better , please provide the DDL statement and your expected result , which can be input through excel and display the result to us .

Bert Zhou

0 Votes 0 ·

0 Answers