Viewing 15 posts - 886 through 900 (of 7,187 total)
OK, if you can't even attach the database, that limits your options severely. The only thing I can think of is to pay lots of money to a company that...
February 9, 2018 at 4:17 am
Not sure when that was published, but I suspect it's very out of date. sp_dboption is deprecated: you should use ALTER DATABASE these days.
I'm not looking over your...
February 9, 2018 at 4:03 am
Where did you get that code?!
Actually, if you can't even restore the database, you've nothing to run a DBCC check against. Is the client saying that they've never backed...
February 9, 2018 at 3:40 am
February 9, 2018 at 3:23 am
I'd rather have everything backedup all at once. February 9, 2018 at 2:44 am
Did you do what it suggested in the error message? Did your client gracefully shut down SQL Server or detach the database before sending you the files? Do you have...
February 9, 2018 at 2:35 am
You can't do that easily. You'd need one query to determine which columns contain values, and a second query to select only those columns. Maybe some sort of dynamic pivot...
February 9, 2018 at 1:59 am
-- Subsititute x for the number of rows you're happy to
-- delete at a time in order to limit transaction log growth
DELETE TOP(x)
FROM MyTable
WHERE...
February 9, 2018 at 1:31 am
Here's one way of doing it:
WITH Dates (StartDate, EndDate) AS (
SELECT '20131201', '20170110' UNION ALL
SELECT '20131101', '20161110' UNION ALL
SELECT '20130101', '20140131'
)
SELECT
February 8, 2018 at 9:23 am
No, you can't do that. Your best bet would be to make a copy of it and use that to script out all the objects and copy the data.
February 8, 2018 at 7:59 am
February 7, 2018 at 3:11 am
WITH MyValues AS (SELECT v FROM (VALUES('WAR') ,('WARTEC') ,('TRIAGE') ,('LAB') ,('BDIAG')) x(v) )
SELECT m.v, s.Name, s.ref
FROM #SampleData s
JOIN MyValues m ON s.ref LIKE '%' +...
February 6, 2018 at 8:04 am
Not like that, but you could use a table value constructor and join to that. I think that would work. If you post up some table DDL (CREATE...
February 6, 2018 at 6:08 am
You didn't post the results of the query I posted, but I suspect the user doesn't exist in the target database, or is orphaned.
USE db1
CREATE...
February 6, 2018 at 6:02 am
February 6, 2018 at 4:36 am
Viewing 15 posts - 886 through 900 (of 7,187 total)