Forum Replies Created

Viewing 15 posts - 9,856 through 9,870 (of 10,144 total)

  • RE: How to Update duplicate records in table

    svhanda (4/30/2008)


    steveb (4/29/2008)


    do you want Education column to be updated to the same value?

    can you post the table structure and some matching sample data for the other table ?

    Hi...

    Thanks for...

  • RE: UK Cultures

    karthikeyan (11/22/2007)


    I want to know UK people cultures. if i came to UK, then i will pick up your people culture easily. Say for example how to behave with man...

  • RE: COUNT and NULL

    There's another way of doing this:

    SELECT dbJobSkillGrp,

    SUM(CASE WHEN dbJobCreateDate BETWEEN @StartDate AND @EndDate THEN 1 ELSE 0 END) AS 'JobsCreated',

    SUM(CASE WHEN dbJobFillDate BETWEEN @StartDate AND @EndDate THEN 1 ELSE...

  • RE: Excluding in a query with multiple conditions?

    Hi

    Here's a suggestion, I'm not sure if it will be sympathetic to your environment but worth a try:

    SELECT {col1, Col2, ...Coln}

    FROM {Table} a

    LEFT JOIN (

    SELECT 2 AS Department, 'B'...

  • RE: Excluding in a query with multiple conditions?

    thehollis (4/22/2008)


    What's the best way to exclude certain records in a query based on multiple conditions?

    Example

    Department Category1 Category2 ...

  • RE: Updates Using Case

    If you are likely to use your cluster code translations again, you could put them into a table and use UPDATE...FROM

    CREATE TABLE #TranslateClusterCodes (CLUSTER_CODE char(3), TGI_CLUSTER_CODE char(2))

    INSERT INTO #TranslateClusterCodes (CLUSTER_CODE,...

  • RE: Finding Date & time from a string

    RyanRandall (4/21/2008)


    This uses explicit conversion, rather than implicit[/code]

    Chris

    I don't see any implicit conversion. Are you suggesting that what I posted is implicit?

    Hi Ryan

    Not at all - CAST() is explicit conversion....

  • RE: Finding Date & time from a string

    This uses explicit conversion, rather than implicit:

    DECLARE @CharDate CHAR(23)

    SET @CharDate = '20081011192921703'

    SET @CharDate = STUFF(STUFF(STUFF(STUFF(STUFF(STUFF(@CharDate, 5, 0, '-'), 8, 0, '-'), 11, 0, ' '), 14, 0, ':'), 17, 0,...

  • RE: Order by Numeric value of a Varchar column Need a better solution

    Have you tried Sergiy's suggestion?

    SELECT * FROM (

    SELECT RIGHT(SPACE(32) + RTRIM(LTRIM(' 1 ')), 32) AS TradeReference UNION ALL

    SELECT RIGHT(SPACE(32) + RTRIM(LTRIM('12345678901234567890123456789012')), 32) UNION ALL

    SELECT RIGHT(SPACE(32)...

  • RE: I got burned today at a SQL Server Interview!

    I just had a haircut! 😛

  • RE: I got burned today at a SQL Server Interview!

    Mark Markov (4/17/2008)


    Not sure I understand what you are saying about burning bridges...

    I am almost sure that noone who is going to interview me will see this thread. So far...

  • RE: Query Help - 1

    If you don't like temp. tables, this is the same code using derived tables:

    select a.People_Number, a.Web_Role, d.Web_Role

    from #TheTable a, (select a.People_Number,a.Web_Role

    from #TheTable a, (select People_Number

    from #TheTable

    group by People_Number

    having count(*)...

  • RE: Query Help - 1

    CREATE TABLE #TheTable (People_Number int, Web_Role int)

    INSERT INTO #TheTable (People_Number, Web_Role)

    SELECT 100, 3 UNION ALL

    SELECT 100, 7 UNION ALL

    SELECT 200, 5 UNION ALL

    SELECT 200, 3 UNION ALL

    SELECT 300, 8 UNION...

  • RE: Query Help - 1

    karthikeyan (4/14/2008)

    Every Database developer should have some thoughts on performance.some people might have worked/faced this kind of situation,if they share their real experience then people like me will get some...

  • RE: try to use function AGE

    Davidyard

    One step at a time: introduce the aggregate last.

    SELECT

    [Incident #],

    [Urgency ID],

    [Group Name],

    [Open Date & Time],

    [SMDBA_Incident_Age] = DATEDIFF(d, [Open Date & Time], GETDATE())-----ERROR is at this line

    FROM [_SMDBA_].[Incident_Age]

    -- Is this...

Viewing 15 posts - 9,856 through 9,870 (of 10,144 total)