1

How can I display the query in such a way to show each day between date?

SELECT job.wo_id
FROM [MES].[MESDB].[dbo].[job] AS job
WHERE job.init_sched_ent_id = 227 
  AND job.sched_start_time_local >= @paramStartDate
  AND job.sched_finish_time_local <= @paramEndDate

I can select each day separately by function from this post but I don't know how to combines these two tables.

https://stackoverflow.com/a/44671808/8853661

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • 1
    Welcome to Stack Overflow. Please [Take the Tour](https://stackoverflow.com/tour), and be sure to read [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) – Bill the Lizard Nov 20 '18 at 14:31
  • 1
    This doesn't *look* like mysql – Strawberry Nov 20 '18 at 14:32
  • That seem like MSSQL not MySQL please edit the tag accordingly – Juan Carlos Oropeza Nov 20 '18 at 14:33
  • Show us db schema, sample data, current and expected output. Please read [**How-to-Ask**](http://stackoverflow.com/help/how-to-ask) And here is a great place to [**START**](http://spaghettidba.com/2015/04/24/how-to-post-a-t-sql-question-on-a-public-forum/) to learn how improve your question quality and get better answers. [**How to create a Minimal, Complete, and Verifiable example**](http://stackoverflow.com/help/mcve) – Juan Carlos Oropeza Nov 20 '18 at 14:33

1 Answers1

0

You can generate dates in mySql and cross join with your select.

The good description is here : generate days from date range

László Tóth
  • 483
  • 5
  • 15