Forum Replies Created

Viewing 15 posts - 1,066 through 1,080 (of 1,131 total)

  • RE: update statement

    To combine multiple rows into a single row, you need to use an aggregate function, which in this case would be MAX.

    Here is complete example, but look at the end...

    SQL = Scarcely Qualifies as a Language

  • RE: Import multiple text files in DTS Package

    This is a common problem and a solution with source code is available at http://www.sqldts.com/default.aspx?246

    SQL = Scarcely Qualifies as a Language

  • RE: Determine when currently executed job started

    Gregory Larsen has some SQL which you could adapt in an article titled "Identifying Long Running SQL Server Agent Jobs" at

    http://www.databasejournal.com/features/mssql/article.php/3500276

    SQL = Scarcely Qualifies as a Language

  • RE: Can''''t assign database Access roles

    This is a bug. See http://support.microsoft.com/kb/826161

    SYMPTOMS

    After you install MS03-031: Cumulative Security Patch for SQL Server, when you make changes to a standard SQL Server login by using Enterprise Manager,...

    SQL = Scarcely Qualifies as a Language

  • RE: Nesting transactions/SPs and error questions (Part 1)

    Although you appear to have Erland Sommarskog's, you must read them in detail. Here are some rule of thumb:

    Transaction must be initiated by the client and not in database...

    SQL = Scarcely Qualifies as a Language

  • RE: TSQL to move all indexes to a secondary filegroup

    Add the following to the "where" to exclude rows that are statistics (sysindexes.status & 64) = 0

    Regarding your logic for indexes that are a physical implimentation of primary...

    SQL = Scarcely Qualifies as a Language

  • RE: Problem w/ Grouping & Count

    What you are attempting to perform is frequently called a pivot.

    This can be done in SQL by using a case statement inside of a sum.

    select FacilityID

    , SUM( CASE WHEN DateHired...

    SQL = Scarcely Qualifies as a Language

  • RE: SQL Server Process owner

    If you mean, the login account for each of the SQL Services, this information is in the registry. Try this script:

    set nocount on

    set xact_abort on

    DECLARE @RegistryPath varchar(200)

    ,@NamedInstanceIndchar(1)

    ,@InstanceNamevarchar(128)

    ,@SQLServerSvcAccountvarchar(128)

    ,@SQLAgentSvcAccountvarchar(128)

    ,@DTCSvcAccountvarchar(128)

    ,@SQLSearchSvcAccountvarchar(128)

    ,@SQLServerStartUpvarchar(128)

    ,@SQLAgentStartupvarchar(128)

    ,@DTCStartupvarchar(128)

    ,@SQLSearchStartupvarchar(128)

    create TABLE...

    SQL = Scarcely Qualifies as a Language

  • RE: tempdb auto grow changes back to growth by 1 MB

    This is a bug within SQL Server.

    Microsoft can tell you how to fix this problem which is to update the sysfiles table to change the file growth from KB to...

    SQL = Scarcely Qualifies as a Language

  • RE: Table Theory - In Table Row Versioning - Questions - HELP!?!?

    In my previous posted, te create table statements for the versions has the identity property specified. This is incorrect and only the core table should have the identity property.

    SQL = Scarcely Qualifies as a Language

  • RE: Table Theory - In Table Row Versioning - Questions - HELP!?!?

    I have successfully implimented this type of historical schema but with a slightly different approach such as:

    -- The CORE table

    create table Partys

    ( PartyId integer identity(1,1)

    , EffectiveDt datetime...

    SQL = Scarcely Qualifies as a Language

  • RE: default database being modified

    Are you aware that any user can change their own default database ?

    If you have tracing enabled, the hostname, SQL login name, Windows login and program can be captured.

    SQL = Scarcely Qualifies as a Language

  • RE: Alerts will not fire!

    Does the error appear in the windows event log under applications?

    When running RAISERROR, are you including the "with log" option?

    SQL = Scarcely Qualifies as a Language

  • RE: Seems like it shouldn''''t be that difficult

    Try this:

    SelecttblEquipment.EquipNumber

    ,Licenses.LicenseNumber

    fromtblEquipment

    join(selectEquipNumber

    ,MIN(LicenseNumber)

    fromtblLicenses

    group byEquipNumber

    ) as Licenses ( EquipNumber , LicenseNumber )

    on Licenses.EquipNumber = tblEquipment.EquipNumber

    SQL = Scarcely Qualifies as a Language

  • RE: % Disk Time vs Disk Reads/sec + Disk Writes/sec

    Not if you known the thruput capabilities of the disk sub-system, which is almost never known.

    Personnaly, I never bother with Disk Reads/sec or Disk Writes/sec but only collect "%Disk Time",...

    SQL = Scarcely Qualifies as a Language

Viewing 15 posts - 1,066 through 1,080 (of 1,131 total)