Forum Replies Created

Viewing 15 posts - 586 through 600 (of 2,452 total)

  • RE: Are the posted questions getting worse?

    TomThomson (6/25/2016)


    BWFC (6/24/2016)


    My wife was born in Edinburgh and we'll be legging it up the M6 as fast as we can with her passport stuck to the inside of the...

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

  • RE: Need algorithm for Complex looping logic

    JoNTSQLSrv (6/25/2016)


    J Livingston SQL (6/25/2016)


    I am sorry...but I cannot tell you if its correct......you have to tell us.

    your sample dataset is small ...perhaps if you expand this for more than...

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

  • RE: Need algorithm for Complex looping logic

    I am sorry...but I cannot tell you if its correct......you have to tell us.

    your sample dataset is small ...perhaps if you expand this for more than one sellerid and also...

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

  • RE: Need algorithm for Complex looping logic

    JoNTSQLSrv (6/25/2016)


    J Livingston SQL (6/25/2016)


    maybe.....???

    WITH cte as (

    SELECT s.SellerID,

    MAX(c.Mincredit) AS mc

    FROM Seller_Table AS s

    LEFT OUTER JOIN Credit_Mater AS...

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

  • RE: Need algorithm for Complex looping logic

    maybe.....???

    WITH cte as (

    SELECT s.SellerID,

    MAX(c.Mincredit) AS mc

    FROM Seller_Table AS s

    LEFT OUTER JOIN Credit_Mater AS c ON s.TotalcreditEarned >=...

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

  • RE: Need algorithm for Complex looping logic

    JoNTSQLSrv (6/25/2016)


    Hi all ,

    Any help from any one ... 1 day left for me to do this

    based on your edited first post...with the code (thanks) please post what...

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

  • RE: Convert multiple rows to columns Dynamically

    hmobasher (6/24/2016)


    Not really...what I do need I believe it's called Dynamic Pivoting on multiple columns and rows. Please see attached image for the desired outcome.

    Thank you,

    Helal

    no image ??

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

  • RE: Need algorithm for Complex looping logic

    JoNTSQLSrv (6/24/2016)


    Thank you very much TheSQLGuru. Please help me. As your name says you are SQL GURU 🙂

    suggest you read this article https://spaghettidba.com/2015/04/24/how-to-post-a-t-sql-question-on-a-public-forum/

    and then provide what Kevin asked...

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

  • RE: Date Range overlaps

    maybe....

    --based on solution http://sqlmag.com/blog/solutions-packing-date-and-time-intervals-puzzle

    CREATE TABLE #testtable(

    ID INT NULL

    ,Code VARCHAR(6) NULL

    ...

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

  • RE: How to make this data into a pivot table

    maybe....

    CREATE TABLE #Emp(EmpRight VARCHAR(10),

    EmpGroup VARCHAR(10));

    GO

    INSERT INTO #Emp(EmpRight,EmpGroup)

    VALUES ('EmpRight1', 'EmpGroup1'),

    ('EmpRight1', 'EmpGroup2'),

    ('EmpRight1', 'Empgroup3'),

    ('EmpRight2',...

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

  • RE: Gaps and Islands with previous possible values

    for clarification please....what results would you expect from this data set

    create table TestData (ID int,TestDate date, Score int)

    insert into testdata Values ('1','1-Jan-16','10')

    insert into testdata Values ('1','5-Jan-16','15')

    insert into testdata Values ('1','10-Jan-16','5')...

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

  • RE: Gaps and Islands with previous possible values

    squvi.87 (6/23/2016)


    Luis Cazares (6/22/2016)


    You could use the Quirky Update. Be sure to read and understand the following article as you might get this wrong if you don't know what you're...

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

  • RE: Help me in adding dynamic pivot dates

    GA_SQL (6/21/2016)


    this task so huge..

    Step 1 : Calculating the efficiency of the employee on daily basis, scenario calculate efficiency based on night and dayshift

    Step 2: Getting this report

    Month -...

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

  • RE: Help me in adding dynamic pivot dates

    Luis Cazares (6/21/2016)


    GA_SQL (6/21/2016)


    Working has Expected

    Do you understand how it works? Remember that you'll be the one supporting it.

    Hi Luis

    have you seen this other thread from OP?

    http://www.sqlservercentral.com/Forums/FindPost1796115.aspx

    this has been ongoing...

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

  • RE: Get data from both the tables even if the condition does not match

    minakshi88 (6/21/2016)


    Can some one help me with the query to achieve the result in the format listed in the image attached.

    The data is also in the image attached.

    one way maybe....

    WITH...

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

Viewing 15 posts - 586 through 600 (of 2,452 total)