Forum Replies Created

Viewing 15 posts - 1 through 15 (of 19 total)

  • RE: Select with Column Index and not Column name

    Hi man,

    ok I just changed your test to tt (using test for something else hehe) but looks like this:

    create table tt (a int, b int, c int, d int, e...

  • RE: SQL If statement finds same temp table

    Ok cool. Didn't think it's possible 🙂

    tx guys

  • RE: SQL If statement finds same temp table

    GilaMonster (5/3/2012)


    What's the default collation of your database?

    What's the default collation of TempDB?

    Database Default - Latin1_General_CI_AS

    Didn't set any for the TempDB

  • RE: SQL If statement finds same temp table

    GilaMonster (5/3/2012)


    Andy Hyslop (5/3/2012)


    Two options spring to mind

    As your using an IF you obviously only want one query to be executed

    DROP Table #TempProduction before the next IF is evaluated then...

  • RE: SQL If statement finds same temp table

    GilaMonster (5/3/2012)


    renvilo (5/3/2012)


    Cool seems to work but I do get:

    Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation

    Lower down in my query. Believe this...

  • RE: SQL If statement finds same temp table

    Ok so lower down I have this:

    Select Budget_Group,BudgetItem_Name,BudgetedValue,MeasureValue, RIGHT(shift,1)+DATENAME(DW,DateCode) as ShiftValue , b.Location

    Into #TempFinal

    From #TempProduction p join

    #TempBudget b on b.Shift = p.ShKey and b.location = p.Source_description

    Group By...

  • RE: SQL If statement finds same temp table

    Andy Hyslop (5/3/2012)


    Two options spring to mind

    As your using an IF you obviously only want one query to be executed

    DROP Table #TempProduction before the next IF is evaluated then create...

  • RE: SQL If statement finds same temp table

    Mark Fitzgerald-331224 (5/3/2012)


    Use a CREATE TABLE statement to create the temp table before the IF and then use INSERT INTO.

    Declare @Measure nvarchar (50)

    create table #TempProduction

    (

    Source_Description <<datatype>>,

    ShKey...

  • RE: SQL 2005 - Shortcut key to take a table to Query window

    Hi,

    I found a program called SQL Manager 2011 and it works really good 🙂

    Only bad thing is I have to have this open and SQL 🙂 but doesn't look...

  • RE: Rows to Columns (bit more advance)

    Hi WayneS,

    sorry about that 🙂 I'll try to provide more detail next time.

    I did speak to the dev. of the program and they will map the database to the...

  • RE: SQL 2005 Pivot Help - Rows to Column

    Cool.. Tx Chris.

    Working fine 🙂 Now just to get them into a Store Proc and then Crystal... But waiting for them to give me access... The rest I should...

  • RE: SQL 2005 Pivot Help - Rows to Column

    Ok that fixed part of it...

    But ok I think I know what the problem is.... It's working BUT

    This is the data I get now:

    AHSD1001068962NULLNULLNULLNULL

    AHSV1002920389275211978102

    AHSF578860NULLNULLNULLNULL

    AHSV1000908733NULLNULLNULLNULL

    So you see there's a lot...

  • RE: SQL 2005 Pivot Help - Rows to Column

    Something is strange 🙁

    I test your code and works 100%

    This is what I have:

    SELECT top 1000

    SourceID,

    ...

  • RE: SQL 2005 Pivot Help - Rows to Column

    No there's no error message 🙂 So it's working but not working lol

    This is it:

    SELECT top 50

    VisitID,

    'Gender:' = MAX(CASE WHEN Query...

  • RE: SQL 2005 Pivot Help - Rows to Column

    Hi Chris,

    I am busy with the article now 🙂 Just like to get more info coz they would like the report before tomorrow (and they asked me yesterday.. nice...

Viewing 15 posts - 1 through 15 (of 19 total)