Forum Replies Created

Viewing 15 posts - 346 through 360 (of 761 total)

  • RE: Data should be merged according to same criteria in the column

    Welcome to SQL Server Central. Hffffff!!!!...long post right??....Do us one last favour....Go through the link in my signature....and post DDL of the tables, Sample Data and Expected Resultset as explained...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Using temp table to SELECT values from another table

    You can read about Dynamic Pivot here:

    Dynamic Pivot

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Using temp table to SELECT values from another table

    Yes We can tweak it.

    --Static Pivot

    Select xDATE, Max(MSFT), MAX(AAPL), MAX(AMD) From

    (Select xDATE, [MSFT], [AAPL], [AMD] From

    (Select A.* From StockQuote as A

    JOIN #TempSymbolList as B ON A.xSymbol = B.TempSymbol) As...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Insert Row Based on Another Row?

    Thanks for the insight Dwain. 🙂

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Eliminating Duplicate Rows

    How about this?

    Select * From Ex Where Column1 IN (Select Column1 From Ex Group By Column1 Having COUNT(Column1) > 1)

    And Column2 <> '-'

    Union

    Select * From Ex Where Column1 NOT...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Using temp table to SELECT values from another table

    Is this what you have i mind?

    --Static Pivot

    Select xDATE, [MSFT] As CloseSymbol1, [AAPL] As CloseSymbol2, [AMD] As CloseSymbol3 From

    (Select A.* From StockQuote as A

    JOIN #TempSymbolList as B ON A.xSymbol...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: SSMS QUERY LOGIC

    I am not asking about the query. Please post the sample data that you posted in your first post in a more understandable format. I am not able to make...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Using temp table to SELECT values from another table

    Please post the DDL and some sample Data of the table DailyStockPrices also.

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: need summarized info in the sql join queries

    Sorry for the late reply. Just worked your Requirements and came up with the following Queries:

    --Query For First Requirement

    Select a.Maker, AVG(b.Screen) As Average_ScreenSize From Product As a

    JOIN Laptop As b...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: SQL query

    If none of the solutions have worked for you yet, then please post some adequate sample data which also contains "Dates".

    The DDL and sample data should be adequate enough so...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Eliminating Duplicate Rows

    This one doesn't use any functions that might not be in older versions. Check if this works:

    --Creating Table

    Create Table Ex

    (Column1 varchar(3),

    Column2 varchar(3),

    Column3 varchar(3) )

    --Insertint Sample Data

    Insert into Ex

    Select...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: SSMS QUERY LOGIC

    Your Sample Data is very unclear. I am not able to make out which data belongs to which column. Please post some better sample data.

    Have a look at the link...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: creating pivot tbl

    ssurekha2000 (6/4/2012)


    no i mean the output needed is

    empid 'basic' da ta ...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: creating pivot tbl

    ssurekha2000 (6/4/2012)


    using the sql that i gve also give s me the same out put a this

    but this is not i need

    i mean i get the empid repeated

    i shld...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Eliminating Duplicate Rows

    prakashp 84206 (6/4/2012)


    Thanks for helping me. But 'ROW_NUMBER() Over' function is unknown in SQL version I am using (Gives error message). What is alternative solution to this problem. Any simple...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

Viewing 15 posts - 346 through 360 (of 761 total)