Forum Replies Created

Viewing 15 posts - 1,921 through 1,935 (of 2,452 total)

  • RE: num of days in week

    weston_086 (3/5/2012)


    ya. number of days in week means =monday to friday(working days).and for that in my table column workday has 'Y' or 'N'.where y=monday to friday and 'N' means...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: num of days in week

    weston_086 (3/5/2012)


    ya..this is my table

    CREATE TABLE dt3

    (

    dates DATETIME,

    workday ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: num of days in week

    weston_086 (3/5/2012)


    i want the result in this way

    insert into dt3 values(2012-03-04,'N','4','21','62','251'),

    (2012-03-03,'N','4,'21','62','251')

    to clarify

    this is your "table"

    CREATE TABLE dt3

    (

    dates ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: num of days in week

    Hi

    not sure about your requirements...are you looking to build a "calendar" table?

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Joining 2 Counts Help (Thank you in advance)

    Dani_87 (3/4/2012)


    My aplogise, here is more info.

    This is my table

    PERSON_IDYEARTERMBANKPAYRATING

    1020076NABCASHB

    1020077NABCredit G

    ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: convert rows into columns

    chandarcst (3/5/2012)


    Hi

    I asked you Send the standard sql tutorial links suppose if you have.

    http://msdn.microsoft.com/en-us/library/ms203721(v=sql.90).aspx

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: [help]I beg! Ebook SQL server 2005 practical troubleshooting: the database engine

    try this link

    http://www.sqlservercentral.com/Books/

    some are free

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Select columns dynamically

    assefam (3/4/2012)


    My Expected result will be ,remove Column C3 and C5 and returns the other as it is

    The orginal value is

    PKC1 C2 C3 ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to display months across like crosstab?

    abhilasht (3/4/2012)


    So we must have the details on the Periods.

    Here i created one sample periods #period table. and come one more issue to find the available periods. So it...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to display months across like crosstab?

    abhilasht (3/4/2012)


    Yes PIVOT is the best

    CREATE TABLE #Sales (SalesDate smalldatetime,Customer int,Sales decimal(20,4))

    INSERT INTO #Sales Values ('2011/11/01',1,10)

    INSERT INTO #Sales Values ('2011/11/02',1,10)

    INSERT INTO #Sales Values ('2011/05/02',2,25)

    INSERT INTO #Sales Values ('2011/12/01',2,20)

    INSERT INTO #Sales...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to display months across like crosstab?

    R.P.Rozema (3/3/2012)


    ? I think I don't get it? But isn't this simply answered by no longer specifying the columns names as 'Jan', 'Feb', etc, but simply label the columns something...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to display months across like crosstab?

    siva 20997 (3/3/2012)


    The reply to the original question will be long and hard to understand once done

    hence I just touched upon the subjects which is needed to be understood to...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to display months across like crosstab?

    Shree-903371 (3/2/2012)


    The problem is we are not allowed to use open queries in out campany.

    does the following give any more ideas?

    USE [tempdb]

    GO

    IF EXISTS (SELECT * FROM sys.objects WHERE object_id...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to display months across like crosstab?

    Shree-903371 (3/2/2012)


    I just gave an example. The months might be changing. So i was looking any dynamically arranging it.

    Hehe...thought so, sorry.

    anyways....please read this post/thread....http://www.sqlservercentral.com/Forums/FindPost1223418.aspx by Jeff Moden

    will give you...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to display months across like crosstab?

    not sure if this is what you are really asking for....maybe something more dynamic perhaps

    but this answers your question 🙂

    CREATE TABLE #Sales (SalesDate smalldatetime,Customer int,Sales decimal(20,4))

    INSERT INTO #Sales Values ('2011/11/01',1,10)...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

Viewing 15 posts - 1,921 through 1,935 (of 2,452 total)