Forum Replies Created

Viewing 15 posts - 4,591 through 4,605 (of 6,036 total)

  • RE: More optimal way?

    UPDATE E

    SET StartDate = getdate(), StartedBy = 1

    FROM EmpApp E

    INNER JOIN dbo.fnSplitString(@list,',') L ON E.EmpId = L.VALUE

  • RE: Misuse of Grouping?

    Assume you cannot create computed columns on source table.

    In this situation I would create a view with

    LEFT(determinant, 5) as deter

    and perform selects for reports from this view.

  • RE: Misuse of Grouping?

    SELECT

    CASE GROUPING(deter) WHEN 0 THEN deter ELSE 'All' END,

    COUNT(*)

    FROM (SELECT LEFT(determinant, 5) as deter

    FROM response_master_incident

    WHERE determinant like '28%'

    AND Response_Date between @d1 and dateadd(ss, -1,...

  • RE: Table ownership

    Not to mention users should not create static tables.

    Never.

  • RE: Random Row Selection

    To order by emp_id, cons_id:

    select emp_id, cons_id

    from (select top 6 emp_id, cons_id

    from rand_sample s

    order by newid()) DT

    order by 1, 2

  • RE: Delete using join

    You must use alias:

    delete A

    from @a A

    left outer join @b-2 as b

    on A.col1 = b.col1

    and A.col2 = b.col2

    and A.col3 = b.col3

    WHERE b.col1 IS NULL

  • RE: maybe dumb, but it doesn''''t work like I thought...

    This behaviour is defined by ANSI standard.

    You need to read a little about NULLs.

    NULL means "Don't know".

    If the value is NULL then it may be 'O', but it...

  • RE: SELECT Question

    In order to display something you need to retrieve it from somewhere.

    Where those not mentioned days suppose to be taken from?

  • RE: SELECT Question

    You did not answer the question.

  • RE: SELECT Question

    Answer for yourself:

    Where those days are stored?

  • RE: Using count(*) more than once?

    It must be rather something like this:

    SELECT count(P.ID) as Persons,

    count(M.ID) as Members,

    count(P.ID) - count(M.ID) as NonMembers

    FROM dbo.Person P

    LEFT JOIN dbo.Membership M ON M.PersonID = P.ID

  • RE: Alter Table

    So if someone will ask you to help to commit suicide and blow up some people around will you give him a hand?

    If some guy will need a cover while...

  • RE: Inserting into a text field in SQL Server 2000

    Looks like some implicit conversion involved, e.g. when using ISNULL or CHARINDEX.

    But without some relevant information cannot make any conclusions.

  • RE: Help needed

    TreatyID = substring(TreatyNumber, 6, 1)

    is an actual query.

  • RE: Help needed

    So, what is your problem?

    You don't know how to use SUBSTRING?

Viewing 15 posts - 4,591 through 4,605 (of 6,036 total)