Forum Replies Created

Viewing 15 posts - 5,446 through 5,460 (of 5,503 total)

  • RE: Looping a stored procedure

    The reason why your proc just processes one line is because you requested to do so:

    CREATE procedure TP__CreateProgressNotes

    (

    @staffkey int

    ,@Userid int)

    ...

    select ... where staffkey=@staffkey

    If you want to insert all lines...

  • RE: Group By or maybe not?

    Hi,

    attached please find a query that's running ok on SS2K5

    What I've done is simply join all your queries to the master table [Konta] via LEFT OUTER JOIN

    and run those queries...

  • RE: Group By or maybe not?

    Hi,

    is it possible that you're using SQL Server 2008?

    The statement

    DECLARE @DateFrom as date = '20090101';

    is no SS2K syntax, but that's the forum you posted in.

    Please clarify, since this will...

  • RE: Group By or maybe not?

    Unfortunately, you decided not to follow the recommendation from my previous post.

    Instead of adding more information you posted less.:crying:

    Since I can't really find any link between your first and your...

  • RE: Group By or maybe not?

    Sure.

    But please provide some more information to figure out what you're trying to do... 😉

    The previous one was more guessing than knowing what you're looking for...

    Also, it would help if...

  • RE: Group By or maybe not?

    Hi,

    would this be the answer to your question?

    select t1.id, count(t1.id) from @Table1 t1 inner join @Table2 t2

    on t2.id like (t1.id + '%')

    group by t1.id

    order by t1.id

    Or maybe

    select t1.id, sum(t2.Value)...

  • RE: insert XML data to SQL server two tables

    Hi yaman bas,

    first of all I need to apologize for recommending a solution that doesn't work on your platform...

    I didn't pay enough attention to what forum you posted in...:blush:

    But, [thank...

  • RE: insert XML data to SQL server two tables

    proposal deleted due to nonworking solution under the given environment (XQuery together XML data type proposed, which doesn't work on SS2K).

    Revised proposal see post

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

  • RE: Result are not comming as expected

    What is your expected result?

    Based on the test data you provided the result is 60 for p1 and 50 for p2.

    Mathematically correct.

    The way your where condition is written you are...

  • RE: help with a script causing locking and blocking

    Hi ravinegi,

    I think you should post the city/state/country your company is located.

    Therewith you'd probably get contacted from one of the local consultants that follow this site or even participate.

    The way...

  • RE: Getting XML formatted results From SQL 2000

    Would it help just to wrap the root elements around your select stement?

    select '{root}' + (SELECT name, description from Orders FOR XML AUTO, ELEMENTS) + '{/root}'

    Note: The xml doesn't show...

  • RE: insert XML data in to sqlserver 2005 table in their respective columns....

    Hello Pranav,

    With the limited information you provided all I can get you is a limited answer:

    Please check the XML Forum of this site http://www.sqlservercentral.com/Forums/Forum21-1.aspx

    There should be at least one answer...

  • RE: Help needed...Manual sorting

    SET sarcasm ON

    For answers please see http://www.cheatSQL101.org.

    SET sarcasm OFF

    I'm sorry, but the old fashioned way of dealing with homework is studying.

    The purpose is that you learn how the...

  • RE: Which country is best for Outsourcing?

    Hey, you know, I'm just thinking about the following scenario:

    If each and every company is outsourcing, then everybody will (still) have enough to do:

    Example:

    Starting outsourcing from the U.S.

    Since you're running...

  • RE: Finding Missing Date

    karthikeyan (3/23/2009)


    2009-01-07 is coming between the date range. so i have to insert it into the table. suppose 2009-01-09 is missing then we no need to insert it.

    if the last...

Viewing 15 posts - 5,446 through 5,460 (of 5,503 total)