Viewing 15 posts - 2,851 through 2,865 (of 7,187 total)
Do you have plenty of free space on the disk(s) on which the msdb data and log files are located?
John
January 11, 2016 at 8:01 am
Gosh, that's the first time you've mentioned that requirement. But not to worry - all you need is a UNION ALL and a further statement selecting all rows where...
January 11, 2016 at 7:58 am
Is it not as simple as this?
SELECT
id
,product
,MIN(start_date) AS StartDate
,MAX(end_date) AS EndDate
,DATEDIFF(DAY,MIN(start_date),MAX(end_date)) AS Diff
FROM @t
WHERE end_date IS NOT NULL
GROUP BY
id
,product
John
January 11, 2016 at 4:01 am
sknox (1/8/2016)
In that case, answer four is still not correct.
It is if you don't want to lose any data. Yes, if you were doing this at all then perhaps...
January 11, 2016 at 2:13 am
January 8, 2016 at 4:57 am
Ooo, how interesting. I thought it was sys.master_files that doesn't get updated immediately, not sys.database_files.
John
January 8, 2016 at 4:53 am
That's curious. What does this return, please?
SELECT name, physical_name
FROM Widgets_Copy.sys.database_files
John
January 8, 2016 at 4:39 am
Are you sure you're looking at the physical name of the files and not the logical name? Please will you post the RESTORE DATABASE script you ran? (If...
January 8, 2016 at 4:12 am
January 8, 2016 at 4:06 am
No, system accounts can't be used for interactive logins. Did you give your own Windows account access when you installed SQL Server? If not, you'll need to ask...
January 8, 2016 at 3:21 am
There are circumstances in which option 4 is the correct answer. The question does not state that the table is empty, nor does it say anything about the data...
January 8, 2016 at 2:58 am
Sergiy (1/6/2016)
Those who know how to design databases and program in SQL...
January 6, 2016 at 3:23 am
Sergiy (1/5/2016)
The fact is - CTE is a foreign construction in SQL.
Is that a problem? Should the language be kept in a glass case and never added to or...
January 6, 2016 at 2:08 am
Edvard
Not directly, no. You could do some additional fancy date arithmetic to subtract Saturdays or Sundays, or you could create a Dates table, and join to that, counting only...
January 5, 2016 at 7:58 am
Nicole
You say it's for ETL processing - are you using SSIS? If so, you might consider weeding out the invalid values in your data flow. There are ways...
January 5, 2016 at 3:21 am
Viewing 15 posts - 2,851 through 2,865 (of 7,187 total)