Forum Replies Created

Viewing 9 posts - 16 through 24 (of 24 total)

  • RE: SQL SERVER 2008 Pivot

    Excuse me, some strings were added and don´t belong to the query: I repeat

    Ok, once executed the following statement

    --=====

    DECLARE @PivotCliPadres VARCHAR(50)

    SELECT @PivotCliPadres =

    COALESCE(

    @PivotCliPadres + ',[' + cast(id_CliPadre as...

  • RE: SQL SERVER 2008 Pivot

    Ok, once executed the following statement

    --=====

    DECLARE @PivotCliPadres VARCHAR(50)

    SELECT @PivotCliPadres =

    COALESCE(

    @PivotCliPadres + ',[' + cast(id_CliPadre as varchar) + ']',

    '[' + cast(id_CliPadre as varchar)+ ']'

    )

    FROM dbo.sipDimensionPos

    DECLARE @PivotTableSQL NVARCHAR(MAX)

    SET @PivotTableSQL = N'

    SELECT...

  • RE: SQL SERVER 2008 Pivot

    Ok Chris:

    --===== Fact Table from wich I need to query data

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    SET ANSI_PADDING ON

    GO

    CREATE TABLE [dbo].[sipFTdataStage](

    [id_sipOltp] [bigint] NOT NULL,

    [id_date_of_survey] [int] NULL,

    [fecha] [smalldatetime] NOT NULL,

    [mes_numero] [int] NULL,

    [mes] [varchar](50)...

  • RE: SQL SERVER 2008 Pivot

    Thanks Chris:

    First of all maybe I´m wrong and this is not a stored procedure, is just the creation of a table variable. Here is what I´m doing: ...

  • RE: SQL SERVER 2008 Pivot

    Thanks Chris, I have a "freshman" question. The stored procedure is generating a table variable. When adding the missing quotation mark I get the successfully executed command...

  • RE: SQL SERVER 2008 Pivot

    Hi Jeff, I´done it and get the same message

    "Msg 105, Level 15, State 1, Line 17

    Unclosed quotation mark after the character string '

    )

    ) pivotable

    ,

    PRINT (@PivotTableSQL)

    '.

    Msg 102, Level 15, State...

  • RE: While Loop

    Thanks steveb, i´ve just used your advice and it´s working fine.

  • RE: While Loop

    Sounds like a case statement being used in the update. How many differnet values of id_promotionSub are there? How many rows of data in the fact table?

    Hi, there are...

  • RE: While Loop

    Hi steveb, understand your explanation. Thanks form that. The table I want to update is a fact table in the data stage area. For each...

Viewing 9 posts - 16 through 24 (of 24 total)