Forum Replies Created

Viewing 15 posts - 1,021 through 1,035 (of 1,439 total)

  • RE: Registering x32 dll for extended sp in SQL server 2005 x64

    FelixG (10/16/2009)


    I've been using the DBA toolkit (http://www.sqlservercentral.com/columnists/mcoles/DBAToolkit.zip) for a long time in my production server running Windows server 2003 (x32) and SQL server 2005 (x32).

    The installation of this toolkit...

  • RE: generate combinations for a number

    Can you explain why you want to do this. The number of combinations for 10 digits is huge.

  • RE: Reading the value from xml variable

    SELECT x1.value('.','VARCHAR(20)'),

    x3.value('.','VARCHAR(20)'),

    x2.value('.','VARCHAR(20)')

    FROM @productIds.nodes('/Products/Desc/Name') AS n1(x1)

    CROSS JOIN @productIds.nodes('/Products/Details/MfgDate') AS n2(x2)

    CROSS APPLY x2.nodes('../Content') AS n3(x3)

  • RE: Sum(A) by B but use the first row for C?

    > using value of the first row of column Num2

    You'll have to explain what "first" row means, but see if this helps

    select userid , sum(Num1) ,min(Num2)

    from Tmp

    group by userid

  • RE: Please help me....

    DECLARE @s-2 VARCHAR(100)

    SET @s-2='Welcome@to@Technology'

    SELECT LEN(@s)-LEN(REPLACE(@s,'@',''))

  • RE: How to find largest value in a subquery

    Maybe this?

    SELECT

    a.id,

    a.data,

    MAX(b.field_b) AS field_b

    FROM

    table_a as a

    LEFT JOIN table_b as b ON a.id =...

  • RE: declare cursor select from another database table

    setlan1983 (10/8/2009)


    Mark-101232 (10/8/2009)


    setlan1983 (10/8/2009)


    Mark-101232 (10/8/2009)


    See if this helps

    CREATE TABLE Table1 (

    column1 int,

    column2 int

    )

    INSERT INTO Table1(column1,column2) VALUES(10,20)

    DECLARE @DBName VARCHAR(128)

    DECLARE @column1 INT

    DECLARE @column2 INT

    SET...

  • RE: declare cursor select from another database table

    setlan1983 (10/8/2009)


    Mark-101232 (10/8/2009)


    See if this helps

    CREATE TABLE Table1 (

    column1 int,

    column2 int

    )

    INSERT INTO Table1(column1,column2) VALUES(10,20)

    DECLARE @DBName VARCHAR(128)

    DECLARE @column1 INT

    DECLARE @column2 INT

    SET @DBName=DB_Name()

    EXEC ('DECLARE...

  • RE: declare cursor select from another database table

    See if this helps

    CREATE TABLE Table1 (

    column1 int,

    column2 int

    )

    INSERT INTO Table1(column1,column2) VALUES(10,20)

    DECLARE @DBName VARCHAR(128)

    DECLARE @column1 INT

    DECLARE @column2 INT

    SET @DBName=DB_Name()

    EXEC ('DECLARE cur1 CURSOR...

  • RE: Ignore overlapping/duplicated times in a timetabling Sum

    I suspect this can be simplified, but should work okay

    WITH LBounds(TutorID,StartTime) AS (

    SELECT s1.TutorID,

    s1.StartTime

    FROM #Classes s1

    WHERE NOT EXISTS(SELECT * FROM #Classes...

  • RE: Comma separated Value

    Matt Whitfield (10/7/2009)


    Ahh I see - interesting he didn't update the article 😀

    I see results on my boxes as being faster for 2000 & 2005 and equitable on 2008, using...

  • RE: Comma separated Value

    Matt Whitfield (10/7/2009)


    The article concludes:

    'I ran these tests several times on a few different servers, and ISNULL appears to pretty consistently out-perform COALESCE by an average of 10 or 12...

  • RE: Comma separated Value

    Matt Whitfield (10/5/2009)


    Use ISNULL. I think people use COALESCE way too much when it's not appropriate, and ISNULL is certainly faster.

    Interesting comment about ISNULL being faster. The results here, especially...

  • RE: How to delete duplicated rows and keep just one?

    -- Assuming ID is unique

    DELETE FROM PERSONS

    WHERE EXISTS (SELECT * FROM PERSONS t2 WHERE t2.FirstName=PERSONS.FirstName

    ...

  • RE: Constraint for only certain values

    Ian Scarlett (10/2/2009)


    Mark-101232 (10/2/2009)


    CREATE VIEW dbo.ActiveDomainNames

    WITH SCHEMABINDING

    AS

    SELECT DomainID,AffiliateID,DomainName,CreatedDate

    FROM dbo.MyTable

    WHERE IsActive=1

    CREATE UNIQUE CLUSTERED INDEX ix ON dbo.ActiveDomainNames(DomainName)

    I see the idea (very neat), but can't figure out how that would limit it...

Viewing 15 posts - 1,021 through 1,035 (of 1,439 total)