Forum Replies Created

Viewing 13 posts - 1 through 14 (of 14 total)

  • RE: Calculate Percentile on Sql 2008

    Thanks for the answer, i know in SQL Server 2012 there are the new functions for calculate percentile, but I still using 2008.

    I read the article by Dwain Camps before,...

  • RE: Calculate Percentile on Sql 2008

    Hi

    In my example I have one table with a column ID and two colums with value.

    What I would like to do is this:

    Col_IDCol1_50_PercentileCol1_97_PercentileCol2_50_PercentileCol2_97_Percentile

    235

    237

    238

    For the column 'Col1_50_Percentile'...

  • RE: Select case statement

    Hello

    And finally I understood the query.

    Now, How can I insert the result into new table, or append to another table.

    Is the result anywhere in memory?

    Regards

  • RE: Select case statement

    It seems to me. I have to change my basic idea and go to another way to resolve the problem.

  • RE: Select case statement

    Hello

    I would like t ouse the same procedure but compare two columns

    On this one I can only check if the value of col_three is 'x' then...

    BEGIN

    SET @sql = @sql...

  • RE: Select case statement

    Hello

    Last question...

    Could I compare in case statement instead:

    BEGIN

    SET @sql = @sql + ', CASE WHEN COL_THREE = ' + CAST(@col_three AS varchar) + ' THEN 1 ELSE NULL END...

  • RE: Select case statement

    No the number of column will be max 500, the data from each variable is the same.So i want to append (union) at the end of each Run

    Regards

  • RE: Select case statement

    Hello

    Last question........ I hope....

    Is it possible to loop the query several time with different variable or array list and union all in the same temporary table?

    For example:

    1...

  • RE: Select case statement

    Thanks a lot for your help.

    Very hard for me as beginner but , I can learn a lot from your example

    Regards

  • RE: Select case statement

    I know, but That is the only way to export the data and show the data . I make the same table with vb.net and it's work well.

  • RE: Select case statement

    Sorry I make a mistake.

    This is the write question:

    I have a table like:

    Col_1.....Col_2......Col_3

    test1.......c............1

    test1.......b............500

    test2.......a............2

    …..

    I would like to obtain this one

    Col_1.....Col_2.....Hist_1.....Hist_2......Hist_3......……Hist_500

    test1.......c............1

    test1.......b..............................................................1

    test2.......a...........................1

    ….

    I hope , I explained it better now

    Regards

  • RE: Select case statement

    Thanks a lot for the answer.

    I will try to explain my problem

    I have a table like:

    Col_1.....Col_2......Col_3

    test1.......c............1

    test1.......b............500

    test2.......a............2

    …..

    Col_1.....Col_2.....Hist_1.....Hist_2......Hist_3......……Hist_500

    test1.......c............1

    test1.......b..............................................................1

    test2.......a...........................1

    ….

    I hope , I explained it better now

    Regards

  • RE: Select case statement

    Thanks a lot for the answer.

    I will try to explain my problem

    I have a table like:

    Col_1 Col_2 Col_3

    test1 ...

Viewing 13 posts - 1 through 14 (of 14 total)