Forum Replies Created

Viewing 15 posts - 5,851 through 5,865 (of 7,614 total)

  • RE: Mass removal ofF permissions

    MickyD (8/19/2014)


    Scott

    Thanks for this . Could you confirm if I need to add the select statement part ?

    Ideal situation would be to read this from a table that exists in...

  • RE: Mass removal ofF permissions

    Something like this should get you going pretty quickly. You can add the "documentation" part by adding a SELECT and/or PRINT to output a message about what is about...

  • RE: Mass removal ofF permissions

    MickyD (8/19/2014)


    ScottPletcher (8/19/2014)


    You should be able to get the spreadsheet into a table by right-clicking on the database to load it into, selecting "Tasks", then "Import Data...", and go thru...

  • RE: Mass removal ofF permissions

    You should be able to get the spreadsheet into a table by right-clicking on the database to load it into, selecting "Tasks", then "Import Data...", and go thru the wizard...

  • RE: More Efficient Way For this T-SQL Query

    My preference would be this (the "extra" parentheses are important to properly match the requirements):

    SELECT *

    FROM YourTable

    WHERE (SnapshotDate > @from AND SnapshotDate < @to)

    OR (SnapshotDate = @from...

  • RE: Merging two large tables (>100m Rows)

    How many rows will be added / changed between uploads / syncs?

    I suggest considering Change Tracking or some other automated method of determining changes rather than trying to do it...

  • RE: Script Generator in table designer?

    The DBA's quite right, you need "WITH CHECK" explicitly specified (or allowed to default). I don't see an option in scripting to explicitly specify this (at least through 2008...

  • RE: Decrease query execution time to retrieve records from huge table

    Grant Fritchey (8/16/2014)


    ScottPletcher (8/15/2014)


    What is(are) the clustering column(s) on the table? You need to read each 1/4 of the table at a time using the appropriate clustering key range.

    What...

  • RE: Prevent RENAME of a database

    Shouldn't the event you want to intercept be "ALTER_DATABASE", not "RENAME"?

    You'll need to interrogate the event data to identity a MODIFY NAME = vs other types of alter database commands.

  • RE: Decrease query execution time to retrieve records from huge table

    What is(are) the clustering column(s) on the table? You need to read each 1/4 of the table at a time using the appropriate clustering key range.

    What are there nonclustering...

  • RE: Preventing Duplicate Rows On An Insert

    AZ Pete (8/15/2014)

    A unique constraint cannot be implemented since the combination of LocationId and ExternalId must be unique only for the cases when ExernalId is not null. There can be...

  • RE: Prevent RENAME of a database

    You should be able to create a DDL trigger to prevent database renames, at least through ALTER DATABASE. I hope sp_renamedb would get caught as well, but I haven't...

  • RE: passing parameters to stored procedure through OPENQUERY

    Alex R (8/15/2014)

    this is the latest syntax error:

    EXEC sde_Stage.dbo._aaa @table_name = ''GLOBAL'',@date = ''OBJECTIDLIST'',@reduce = 0.0025,@oid =''3476,6673''

    SELECT * FROM OPENQUERY ([10.100.1.40], 'EXEC sde_Stage.dbo._aaa @table_name = ''GLOBAL'',@date = ''OBJECTIDLIST'',@reduce = 0.0025,@oid...

  • RE: passing parameters to stored procedure through OPENQUERY

    I don't believe you can use varchar(max) across linked servers; try varchar(8000).

  • RE: Query that returns SUM of column based on other data in other column

    Something like this:

    SELECT ServerName

    ,SUM(CASE WHEN FileType <> 'LOG' THEN FreeSpace ELSE 0 END) AS 'Available Data Space'

    ,SUM(CASE WHEN FileType = 'LOG' THEN FreeSpace ELSE 0 END) AS 'Available...

Viewing 15 posts - 5,851 through 5,865 (of 7,614 total)