Forum Replies Created

Viewing 15 posts - 1,051 through 1,065 (of 1,132 total)

  • RE: Need help on a Trigger

    You trigger is coded in a complicated and procedural manner where a single statement that does the update whenever the dependent values change would be simplier.

    Try this:

    CREATE TRIGGER Dollars ON...

  • RE: Problem with BUILTIN\Administrators

    When you deny access to the group BUILTIN\Administrators, you are denying access to all members of the group, including the domain account used for the SQL Server service.

    First,...

  • RE: sqlservercentral spamming??

    FYI: Yahoo puts the SQLServerCentral.com Daily Update into the bulk folder. Yahoo also bulks sql-server-performance.com

    I have my filter options set to force mails from either site into my...

  • RE: Converting Oracle built-in functions to SQL Server

    The Oracle NVL and COALESCE functions behave identically but COALESCE is ANSI standard and is supported by SQL Server.

    This SQL will work for both Oracle and SQL Server

    SELECT COALESCE(MAX (KEY...

  • RE: Character Iteration script is not very efficient

    Your current statement performs 11,881,376 seperate insert statements and for each insert, space management and transaction log writes must be performed. A single statement that inserts all of the...

  • RE: Names of columns in the Primary Key

    See the catalog views in the master database owned by the special "user" INFORMATION_SCHEMA

    For primary keys, see view INFORMATION_SCHEMA.KEY_COLUMN_USAGE

  • RE: Conditional Query

    Not tested, but here is a single SQL statement that should work. The solution uses a nested table with counts for rows, date1 not null and date2 not null...

  • RE: Determining the initial size of TempDB?

    The initial specifications for tempdb data and log are retained in table master.dbo.sysaltfiles.

    select dbid, name, size as SizePages

    , Size * 8 / 1024 as SizeMb

    from sysaltfiles where dbid = 2

    go

  • RE: How to see all columns of all tables in a database?

    Just as there are global stored procedures in the master database that are context sensitive to the current database, there are also global views in the master database that can...

  • RE: Speedy Sub-Queries??

    From the Query Plan, the SQL performs:

    18 Clustered Index Scans (this is bad)

    3 Index Seeks (this is good)

    21 Hash Matchs (this may be bad)

    1 Merge Join (this may...

  • RE: Cannot start SQL Server

    All of the documentation that I have seen on setting Windows Security when the SQL Server and Agent Accounts are not in the local administrator group is incorrect including the...

  • RE: How to ignore errors inside triggers

    The bad news is this can be done with SQL only for some error but cannot be done for all types of errors.

    When an error is encountered, a...

  • RE: Simple command to display all tables in a database

    select *

    from INFORMATION_SCHEMA.TABLES

    where Table_Type = 'BASE TABLE'

  • RE: selecting result of a dynamic sql statemnt into a variable

    From a previous post:

    We are collecting the department info.

    Every department was set two electric power levels one High and the other low. Suppose if The electric power is beyond the...

  • RE: help with procedure

    Some of the desired output is confusing, but here is a start.  I have changed the table names from the cryptic zTempTable to more meaninful names, add primary keys and...

Viewing 15 posts - 1,051 through 1,065 (of 1,132 total)