Viewing 15 posts - 3,136 through 3,150 (of 7,614 total)
October 4, 2018 at 8:43 am
Isn't this the third iteration of the same essential q? Why do you keep re-posting the same q??
October 3, 2018 at 3:49 pm
October 3, 2018 at 3:47 pm
I suggest just this. If that still performs poorly, we'll have to look at the view itself and tune it.
DECLARE @StartDate date = '01-01-2018'
,...
October 3, 2018 at 3:41 pm
SELECT
EmployeeId, Forename, Surname, DateOfBirth, leaver, EmployeeStartDate, LeftDate
FROM (
SELECT *, ROW_NUMBER() OVER(PARTITION BY EmployeeId
ORDER...
October 3, 2018 at 3:15 pm
I'm assuming, and hoping, that you copied the files to the new locations rather than moved them (never do that, always copy and retain the originals until the ONLINE works...
October 3, 2018 at 3:11 pm
The only thing I see that could help would be a separate index on just:
(col1, col2)
If possible, use compression on the index, at least row but page if...
October 3, 2018 at 12:17 pm
I think you could use an INSTEAD OF INSERT trigger to do that, adding a view if necessary to avoid SQL "compile"/pre-scan issues. Of course the trigger would apply to...
October 3, 2018 at 10:44 am
I don't follow.
So there can be multiple rows for Product ABC123. Why? To allow changes over time? Or for diff locations?
It might be helpful to do this logically,...
October 3, 2018 at 10:43 am
If you want to add an IDENTITY column in table1 that is not in table2, you can do this:
select IDENTITY(int, 1, 1) AS id, *
into table1...
October 2, 2018 at 1:07 pm
SELECT EName, UnitsSold, Category
FROM (
SELECT *, ROW_NUMBER() OVER(PARTITION BY Category ORDER BY UnitsSold DESC) AS row_num
FROM #t
WHERE...
October 2, 2018 at 12:50 pm
You should do at least some normalization here. I'd say the below is the minimum. Easiest is a separate row for each column. Without more normalization, yes, that will result...
October 2, 2018 at 10:58 am
You could change the date format just for that code:
DECLARE @dateformat_setting char(3)
IF OBJECT_ID('tempdb.dbo.#useroptions') IS NOT NULL
DROP TABLE #useroptions
CREATE TABLE #useroptions (
October 2, 2018 at 10:35 am
October 2, 2018 at 8:28 am
Sorry, extremely busy at work, didn't finish code before. Maybe as below?
INSERT INTO [dbo].[SomeCause] ( SomeID, SomeType, SomeThingElseID, SomeDesc )
SELECT SC.SomeID, SC.SomeType, SC.SomeThingElseID_New, SC.SomeDesc
October 1, 2018 at 2:35 pm
Viewing 15 posts - 3,136 through 3,150 (of 7,614 total)