Viewing 15 posts - 856 through 870 (of 13,465 total)
tobypaul509 (8/23/2016)
I need to purchase a tool for my...
August 23, 2016 at 9:04 am
ChrisM@Work (8/23/2016)
JasonClark (8/23/2016)
CREATE TRIGGER [TR_ProtectCriticalTables]
ON DATABASE
FOR
DROP_TABLE
AS
DECLARE @eventData XML,
@uname NVARCHAR(50),
...
August 23, 2016 at 8:54 am
GilaMonster (8/22/2016)
Try filtering on database_id, or is the db_id the id of the connection rather than the table?
doh simple and obvious;
the database_id =2 , regardless of what database context that...
August 22, 2016 at 9:52 am
whenever the difference between estimated rows and actual rows is off by a lot(order of magnitude or more,
it usually means the statistics are out of date enough to adversely affect...
August 17, 2016 at 7:15 am
it's an easy fix.
change the NOINIT TO INIT
that is append vs create/overwrite.
mwinn (8/11/2016)
August 11, 2016 at 2:04 pm
the data is the data. don't modify the data, modify the query that is exporting to csv.
if you use SSIS, you can modify it to export everything with double...
August 8, 2016 at 8:34 pm
i think you want something like this:
SELECT
'exec sp_rename ''' + QUOTENAME(Table_Name) + '.' + QUOTENAME(REPLACE(COLUMN_NAME,'''','''''')) +
''', ''' + QUOTENAME(LOWER(REPLACE(COLUMN_NAME,'''',''''''))) + ''', ' + '''COLUMN'';'
FROM
Information_Schema.[COLUMNS]
WHERE COLUMN_NAME <>...
August 8, 2016 at 9:04 am
any object name with a single quote in it needs to be escaped in a command:
exec sp_rename '[table_name].[Rec''d 2007]', '[rec''d 2007]', 'COLUMN';
August 8, 2016 at 8:47 am
TheSQLGuru (8/7/2016)
August 7, 2016 at 2:15 pm
Does the existence of duplicates actually break anything, or is it just a cleanup task because the .net application doesn't check for duplicates before adding the data? the urgency is...
August 7, 2016 at 1:28 pm
wow Line 74851
thats a huge proc to debug.
at that size, it must be doing a zillion things, that's rough.
July 30, 2016 at 6:37 am
i think it would be like this, right?
DECLARE @TermToTweak VARCHAR(30) = 'lowell@fake.com'
DECLARE @cmd VARCHAR(MAX) = 'EXECUTE AT(LinkedServer,''update P
set P.Email1 = ''' + @TermToTweak + '''
from MyDatabase.dbo.Profiles P
JOIN MyDatabase.dbo.Complaints C on...
July 29, 2016 at 1:26 pm
homebrew01 (7/29/2016)
The query runs on Server_A, via Linked Server to Server_B, where both tables reside.
If I...
July 29, 2016 at 12:49 pm
probably with a CASE statement;
something like this in your proc(assuming parameters are available for all four fields you mentione:
update Table1
SET Field1 = CASE WHEN @Field1 IS NULL THEN Field1...
July 29, 2016 at 12:39 pm
i use this to script out indexes,
I just tested it an Azure, no problems, of course.
i've excluded fillfactor in it, you could tweak the statement generation to whatever you...
July 29, 2016 at 10:43 am
Viewing 15 posts - 856 through 870 (of 13,465 total)