I tried using Cross Join but it takes 5 minutes to run, there is another way to do that? Note: I'm comparing dates and Int Fields, Table 1 has records from a system and table 2 store a work calendar dates. SQL Server.
相关问题
- sql execution latency when assign to a variable
- What is the best way to cache a table from a (SQL)
- php PDO::FETCH_ASSOC doesnt detect select after ba
- Bulk update SQL Server C#
- SQL to Parse a Key-Value String
相关文章
- Entity Framework 4.3.1 failing to create (/open) a
- Code for inserting data into SQL Server database u
- SSIS solution on GIT?
- Delete Every Alternate Row in SQL
- MYSQL: How can I find 'last monday's date&
- Linux based PHP install connecting to MsSQL Server
- SQL Azure Reset autoincrement
- How do we alias a Sql Server instance name used in
You don't make it easy, but here is a working solution. In the future try to use this type of code in your question so we can focus on the query and solution. I have edited some of your dates to make the example work.
EDIT: New Code
you could change out the
from master..spt_values n1
for something like this: