Forum Replies Created

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

  • RE: get data from two tables

    Thanks Paul, as you posted, I finally used right outer join instead of full outer join. Also thanks for the MERGE operator. I´m going to try...

  • RE: get data from two tables

    Hi guys, I got the answer in this excellent article

    "Intersect, Except, Union, All and Any" (5/21/2010). great resources found here.

  • RE: SQL SERVER 2008 Pivot

    Thank´s Chris, really learned and enjoyed. Thanks for asking me to give a little bit and not just ask for the solution.

  • RE: SQL SERVER 2008 Pivot

    Yes, you´re great, it works, I get a pivoted datagrid. Thanks a lot. How do I award you. I´m grateful with you!!

  • RE: SQL SERVER 2008 Pivot

    However once executed I receive this message:

    "Command(s) completed successfully."

    How do I query the pivoted data?

  • RE: SQL SERVER 2008 Pivot

    Ok I´m a little bit lost. So the temporary table was created just for say, the problem resolution, something didactic. Your rigth there is no filtering a...

  • RE: SQL SERVER 2008 Pivot

    Ok Chris, I´ve made two changes:

    1. Replaced the sample data by a query from the table.

    2. Linked the pivot query to the temporary table, say wherever I found...

  • RE: SQL SERVER 2008 Pivot

    Hi Chris, so the whole query looks like this, even do how do I query the pivoted data?

    --===== Create table

    DROP TABLE #sipDimensionPos

    CREATE TABLE #sipDimensionPos(

    ...

  • RE: SQL SERVER 2008 Pivot

    Ok Chris, the result is this:

    [101],[110],[115],[120],[130],[135],[155],[233],[240],[487],[489],[624],[720],[1152],[1652],[1676]

  • RE: SQL SERVER 2008 Pivot

    HI Chris,

    --===== Create table

    CREATE TABLE #sipDimensionPos(

    [id_pos] [bigint] NULL,

    [id_cliente] [bigint] NOT NULL,

    [razonSocial_cliente] [varchar](100) NULL,

    [id_CliPadre] [int] NULL,

    [nombre_CliPadre] [varchar](100) NULL,

    [id_canal] [smallint] NULL,

    [id_sucursal] [smallint] NULL,

    [establecimiento] [varchar](100) NULL,

    [nombre_Localidad] [varchar](100) NULL,

    [ponderado_gondola] [numeric](10, 3) NULL,

    [id_formato] [int]...

  • RE: SQL SERVER 2008 Pivot

    Well Chris, about the variable size, yes I tested it and it works, with 1000 bits size.

    Now let´s go with second point:

    --===== Create test table #sipDimensionPos

    SELECT...

  • RE: SQL SERVER 2008 Pivot

    Hi Chris, you´re great, the solution is close. When executed what you suggest I receive the following:

    -- Check that the code executes ok:

    Command(s) completed successfully.

    -- no CliPadres string

    Query...

  • RE: SQL SERVER 2008 Pivot

    Yes, this is satisfactory. What I need is instead of manually defining the variables in the query, it must be defined dinamically by the selection made by...

  • RE: SQL SERVER 2008 Pivot

    codigo_item item id_stock 130 1652489

    141400 ...

  • RE: SQL SERVER 2008 Pivot

    Yeha, like this one

    --=====

    SELECT *

    FROM (select codigo_item, item, round(net_price,1) as net_price, id_CliPadre, id_stock from dbo.sipFTdataStage INNER JOIN

    ...

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