Viewing 15 posts - 1,336 through 1,350 (of 13,469 total)
it would really depend on the database. you'd want to keep track of the sizes some diff packups of the db over time for a while.
if the database just...
December 15, 2015 at 2:45 pm
i adapted and created some sample data.
Declare @MyDay datetime = '2015-01-01'
;With MYFirstNames(FName) AS
(
Select 'Leonardo' UNION ALL
Select 'Brad' UNION ALL
Select 'Arnold' UNION ALL
Select 'Mark' UNION ALL
Select 'Matt' UNION ALL
Select 'Bruce'...
December 10, 2015 at 7:29 am
if StartShift and EndShift are DateTime data types, you can just use Datediff to get the period of time.
SELECT DateDiff(minute,StartShift,EndShift) from yourtable.
if it's a TIME data type, you have to...
December 10, 2015 at 6:21 am
i think the OP might be copy/pasting from the Powershell ISE and getting whitespace tot he right of the values, but that's a product of the results panel, and not...
December 4, 2015 at 12:37 pm
i've done this with excel automation, which you can do in a script task,
this is a rough example i modified, but I did not explicitly test against your file.
basically, i'm...
December 4, 2015 at 11:57 am
you have to create the table explicitly, and then insert into the table; you cannot take advantage of the INTO #temp without jumping through extra hoops using openquery / openrowset
CREATE...
December 3, 2015 at 1:11 pm
dallas13 (12/3/2015)
Thanks but still its throwing the error message.
what specific error do you get? also look in the SQL error log for a detailed error instead of an "ended in...
December 3, 2015 at 12:39 pm
dallas13 (12/3/2015)
I tried it but its giving me error.ALTER TRIGGER [TR_LOGON_APPUSER_SSMS]
EXECUTE AS OWNER
i have a couple of model DDL triggers that execute as specific users; i think that's the way...
December 3, 2015 at 12:08 pm
i think you'll need EXECUTE AS OWNER in the trigger; otherwise it's the end users context, i think, who might not have access to msdb, and thus the ability to...
December 3, 2015 at 11:08 am
in cases like this, i suggest not working around the error, but addressing the error head on: huge query that exceeds 4K or whatever.
instead of having the report pass a...
December 2, 2015 at 8:28 am
curious_sqldba (12/1/2015)
how do the files move from one drive to another?
i'd go with doing it physically.
if you really want to automated it,
you might do it via xp_cmdShell and the MOV...
December 1, 2015 at 3:18 pm
i use this snippet a lot; but it is centric to a single database, but i bet it gets you 90% there.
it assumes I KNOW the destination for the...
December 1, 2015 at 2:17 pm
for me, mentally,
CROSS APPLY = INNER JOIN
and
OUTER APPLY = LEFT OUTER JOIN
so if anything is going to consume the results of the previous JOIN/CROSS (ie using the...
December 1, 2015 at 2:12 pm
this is syntactically correct,, and gives you your start and end indicators, as a set base doperation.
is this more like what you are after?
SELECT cdsDescription,st.[1stPos],en.[2ndPos]
FROM tbCompdistances
CROSS APPLY(SELECT CHARINDEX(' ',cdsDescription) AS...
December 1, 2015 at 12:40 pm
something like this is what i slapped together; does this look right?
UPDATE MyTarget
SET
MyTarget.[IsCurrent] ...
December 1, 2015 at 12:34 pm
Viewing 15 posts - 1,336 through 1,350 (of 13,469 total)