Forum Replies Created

Viewing 15 posts - 121 through 135 (of 761 total)

  • RE: how to Pivot this

    yuvipoy (12/26/2012)


    hi

    i am having two tables one table is having header details and another is having data

    Table_idCol_1Col_2 Col_3Col_4 Col_5Col_6

    1Mytab_1_1NULL Mytab_1_2NULL Mytab_1_3 ...

    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 Server Pivot tables

    Is this what you are looking for?

    --Creating Tables

    Create Table Store_Audit_Type

    (

    Audit_Type_Id Int,

    Audit_Type_Description NVarchar(30)

    )

    Create Table Store_Audit_Details

    (

    StoreId Int,

    Audit_Type_Id Int,

    CreatedDate Date

    )

    --Inserting Sample Data...

    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: Finding a quote in a string

    Bhuvnesh (12/26/2012)


    vinu512 (12/24/2012)


    Lets drink then :

    Select Char(34) + Char(67) + Char(72) + Char(69) + Char(69) + Char(82) + Char(83)+ ' ' + Char(68) + Char(87) + Char(65) + Char(73) +...

    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: Query Help

    Sean Lange (12/21/2012)


    Excellent job posting ddl, sample date and desired output!!! I wish everybody would post their questions like this.

    Here is one way to do this.

    select * from #temp

    where cCurrentGradeCode...

    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: Monthly balance from two tables

    hemal_301080 (12/26/2012)


    πŸ™‚

    Thank Vinu Vijayan

    No probs Hemal....it was my bad.

    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: Monthly balance from two tables

    I'm sorry Hemal, there is a slight error in my query. If there is data for more than one year then the data would be grouped only according to month...

    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: Monthly balance from two tables

    hemal_301080 (12/26/2012)


    Thanks, this worked

    You're Welcome!! πŸ™‚

    Anytime Lokesh. It was just a matter of Grouping the data before joining.

    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: Monthly balance from two tables

    This would do what you are looking for:

    Select p.Month, SUM(p.cramount) As Credit, SUM(q.dramount) As Debit From

    (

    Select b.voucherno, DATENAME(MM, a.dt) As Month, SUM(b.cramount) As cramount From voucher As a...

    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: t-sql 2008 avoid a cartesian product

    There are 3 tables which are: 1. a claims table by client number that has the duplicate data wtihin some of the rows. 2. a price table and 3. an...

    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: Happy Holidays 2012

    Happy Holidays to you too Steve..........I guess the others have already started.....anyways wishing everyone a Merry Christmas and a Happpy New Year!!!!!! πŸ™‚

    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: Finding a quote in a string

    dwain.c (12/24/2012)


    vinu512 (12/24/2012)


    dwain.c (12/24/2012)


    vinu512 (12/20/2012)


    dwain.c (12/20/2012)


    vinu512 (12/20/2012)


    dwain.c (12/19/2012)


    Since quote is also CHAR(25), you can also do this:

    CHARINDEX(CHAR(25), string_column) > 0

    Single Quote is char(39) Dwain......if I am not wrong. πŸ˜‰

    Looked like...

    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: Finding a quote in a string

    dwain.c (12/24/2012)


    vinu512 (12/20/2012)


    dwain.c (12/20/2012)


    vinu512 (12/20/2012)


    dwain.c (12/19/2012)


    Since quote is also CHAR(25), you can also do this:

    CHARINDEX(CHAR(25), string_column) > 0

    Single Quote is char(39) Dwain......if I am not wrong. πŸ˜‰

    Looked like a single...

    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: help!!! calculate average rolling 4 last weeks

    Lidou123 (12/20/2012)


    Hi Vinu,

    thank U for your answer !!!

    I tested the script but I have an error !!! it is in french .

    MsgΒ 116, NiveauΒ 16, Γ‰tatΒ 1, LigneΒ 8

    Une seule expression peut Γͺtre spΓ©cifiΓ©e...

    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: How to determine which items in one table do not appear in a second table

    Melanie Peterson (12/20/2012)


    Thank you, Vinu! The EXCEPT statement is new to me. Always nice to learn something new.

    Yes it is always good to learn something new Melanie.

    And what is...

    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: Finding a quote in a string

    dwain.c (12/20/2012)


    vinu512 (12/20/2012)


    dwain.c (12/19/2012)


    Since quote is also CHAR(25), you can also do this:

    CHARINDEX(CHAR(25), string_column) > 0

    Single Quote is char(39) Dwain......if I am not wrong. πŸ˜‰

    Looked like a single quote when...

    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 - 121 through 135 (of 761 total)