Forum Replies Created

Viewing 15 posts - 3,751 through 3,765 (of 6,036 total)

  • RE: delete duplicates

    And results I've got are quite different:

    ===== Jeff ======

    DBCC execution completed. If DBCC printed error messages, contact your system administrator.

    DBCC execution completed. If DBCC printed error messages, contact your system...

  • RE: delete duplicates

    Strange...

    I always thought that

    FROM dbo.AilmentDetail_Test ad1,

    dbo.AilmentDetail_Test ad2

    WHERE ad1.AilmentID = ad2.AilmentID

    ...

  • RE: execute string in a query

    It starts from point "Data Dictionary".

  • RE: execute string in a query

    Rakesh,

    where you formula come from?

    Can users define formula?

    Is there any fixed set of formula your system supports?

    1st option is quite dangerous. It gives user a possibility to read data they...

  • RE: Indexing Question

    Queries with criteria will use index if this index is clustered.

    Even if you query for less than 1% of rows in table optimizer does not know that when it's...

  • RE: UNION IF query problem

    DECLARE @GroupMeat TABLE ( -- Must be static table in DB!

    Name nvarchar(100),

    Group nvarchar(100)

    )

    INSERT INTO @GroupMeat (Name, Group)

    SELECT N'COGS', N'COGS'

    UNION

    SELECT N'REVENUE', N'REVENUE'

    UNION

    SELECT N'Other Income', N'REVENUE'

    UNION

    SELECT N'Interest Income', N'REVENUE'

    UNION

    SELECT N'Gain on Disposal...

  • RE: sort order

    I guess it's also about returning "20 first rows" or "Rows 21-40" in order specified.

    To do sorting in application you need to pump while dataset from DB, even if user...

  • RE: Setting up RPC via Trigger

    Glenn,

    despite all your reasons the method you've chosen is unappropriate.

    End of story.

    There are a lot of other technical reasons why it should not be done this way.

    Rethink your approach.

  • RE: Last Friday of given week

    Actually I did not find there any attempt of offence from your side.

    I just explained why I took it from the point of known...

  • RE: Last Friday of given week

    I saw at least 3 different ways of interpreting "22nd week of the year".

    I believe OP knows better when Nth week starts and when it finishes, so it's up to...

  • RE: Last Friday of given week

    This does not depend on DATEFIRST settings:

    Declare @d datetime

    SET @d = GETDATE()+1

    SELECT @d, DATEADD(dd, 6 - (@@Datefirst + Datepart(dw, @d) ) %7 , @d) as NextFriday

    Will return next Friday...

  • RE: Need help with SELECT statement against unusual table...

    I don't think there is any need of changing table.

    I think in real life it does not matter which number is assigned to "Green" and which number is assigned to...

  • RE: Setting up RPC via Trigger

    Not sure why do you need that table at all.

    It repeats information stored in master system tables.

    CREATE VIEW [dbo].[ControlTable]

    AS

    SELECT srvname AS SQLServer, srvid as ServerId, ...

    FROM master.dbo.sysservers

    GO

    Now, instead of...

  • RE: sort order

    select empid,empname,jobrole

    from dbo.emp

    order by ISNULL(@DisableEmpidOrder, empid), ISNULL(@DisableEmpnameOrder, empname), ISNULL(@DisablejobroleOrder, jobrole)

  • RE: Need help with SELECT statement against unusual table...

    I wonder if "Green" may have only Number = 3.

    What if some customer has all colors: Blue, Yellow, Red and Green?

    Will it shift Green to Number = 4?

    And which numbers...

Viewing 15 posts - 3,751 through 3,765 (of 6,036 total)