Viewing 15 posts - 4,426 through 4,440 (of 7,597 total)
Most flexible is probably to put the dbs names/LIKE patterns into a temp table and process only names that have a match in that table:
IF OBJECT_ID('tempdb.dbo.#databases') IS NOT NULL
...
February 9, 2016 at 10:18 am
Perry Whittle (2/9/2016)
ScottPletcher (2/9/2016)
Perry Whittle (2/9/2016)
Luis Cazares (2/8/2016)
February 9, 2016 at 9:53 am
Perry Whittle (2/9/2016)
Luis Cazares (2/8/2016)
February 9, 2016 at 9:35 am
Sergiy (2/8/2016)
Igor Micev (2/5/2016)
The advise from ScottPletcher is just fine. Changing from smallint to...
February 9, 2016 at 8:29 am
Snapshot won't help you, in fact it will very likely make performance worse.
If you only need to refresh the reporting view once a day, back up the original db and...
February 8, 2016 at 12:40 pm
Interesting. The code below should work fine. What error are you getting? Are you sure that time is always formatted correctly?
SELECT CAST(LEFT([Date],8)+' '+Time_on AS datetime)
February 8, 2016 at 10:13 am
The command to change an existing data type is simple enough to issue:
ALTER TABLE dbo.table_name ALTER COLUMN <new_data_type> NULL --or "NOT NULL" of course
--always explicitly specify NULL or NOT NULL,...
February 4, 2016 at 5:00 pm
Since using character data tends to slow things down, maybe this:
SELECT DATEADD(DAY, b.Fiscal_Year_End_Day_Nbr - 1,
DATEADD(MONTH, b.Fiscal_Year_End_Month_Nbr - 1,
...
February 4, 2016 at 10:34 am
Give this query a try: I couldn't test it as I don't have data:
SELECT team,sum(ats) as W,sum(atsloss) as L,sum(O) as Ov, sum(U) as Un,
...
February 2, 2016 at 2:45 pm
Here's some sample code, in case it helps:
DECLARE @text_column varchar(max)
SET @text_column =
'I need to pull whatever the string is in a text column that occurs after the word Requestor:...
February 2, 2016 at 2:37 pm
If you want a specific value, return it from the proc, don't rely on the "last" statement in the proc yielding the correct @@ROWCOUNT: how is someone later supposed to...
January 30, 2016 at 9:53 am
Hugo Kornelis (1/30/2016)
January 30, 2016 at 9:45 am
Since the final date format is "self delimiting", you don't have to add spaces in the result. But I would adjust the code to allow the day to be...
January 29, 2016 at 5:08 pm
Jeff Moden (1/27/2016)
ScottPletcher (1/27/2016)
Jeff Moden (1/26/2016)
Manic Star (1/26/2016)
January 27, 2016 at 9:15 am
I don't have any sample data, so I can't possibly test the code first. If I had data, I would have tested it first.
January 27, 2016 at 7:53 am
Viewing 15 posts - 4,426 through 4,440 (of 7,597 total)