Viewing 15 posts - 1,396 through 1,410 (of 7,614 total)
You didn't provide any sample data, so I can't test my code, but something like this should do what you need:
SELECT COUNT(*) AS DayCount
,YEAR(myDateTime) AS Year
,MONTH(myDateTime) AS...
July 26, 2021 at 2:26 pm
When you create the proc, you would need to specify EXEC AS OWNER, making sure the OWNER is a high-level user.
When you just give permission to EXEC the proc, the...
July 22, 2021 at 7:20 pm
Yes. The format is fixed, with the dashes always in the same locations.
July 21, 2021 at 11:33 pm
I suggest creating the following indexes to support the query. If you'd like to adjust other indexes on the tables also, just let me know.
CREATE...
July 21, 2021 at 4:12 pm
If you can, review the query plan to verify that those indexes are actually being used. Without a query plan, we can't tell for sure.
July 21, 2021 at 4:01 pm
I suggest creating the following indexes to support the query. If you'd like to adjust other indexes on the tables also, just let me know.
CREATE...
July 21, 2021 at 3:49 pm
I suggest creating the following indexes to support the query. If you'd like to adjust other indexes on the tables also, just let me know.
CREATE UNIQUE NONCLUSTERED...
July 21, 2021 at 5:00 am
One of the tables you're joining to must have an extra matching row in it compared to what you were used to seeing. I can't tell which one from what...
July 20, 2021 at 9:33 pm
Would you give us actual table data -- i.e. CREATE TABLE and INSERT statement with VALUES -- rather than just a picture? We can't write SQL against a picture :-).
This...
July 20, 2021 at 9:30 pm
Hmm, interesting. Lots of indexes there, so we'll need to do a full analysis, if you're willing. Please run the attached query and post the results in some type of...
July 20, 2021 at 7:03 pm
Adding a running number can add records if before the column addition there were duplications that were shown only once but after the column addition they stopped being duplications. ...
July 20, 2021 at 3:06 pm
I can't offer index recommendations without seeing the DDL for the tables, including all current index definitions. The most critical index is the clustered index, so that should be determined...
July 19, 2021 at 7:50 pm
I typically use SSIS to do that, since it has the inherent capability to run multiple imports async.
July 18, 2021 at 7:43 pm
We need to see DDL for the tables, including index definitions, the query plan and the query itself. There's no way for us to just imagine what is happening and...
July 18, 2021 at 7:41 pm
Are you really only returning a single column from the query?
If so, change to SELECT just from the table with that column, and use a WHERE EXISTS() on the other...
July 18, 2021 at 7:40 pm
Viewing 15 posts - 1,396 through 1,410 (of 7,614 total)