Forum Replies Created

Viewing 15 posts - 8,161 through 8,175 (of 8,731 total)

  • RE: query to find timgaps between rows

    Maybe we're thinking a little bit different. Here's the solution I came with and a possible improvement using a temp table. If you're going to filter your information remember to...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: query to find timgaps between rows

    I'm willing to help you (as a matter of fact, I already have a solution for you). However, I want you to show me what have you done so far....

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: sql query to be accessed online

    Do you want the query to be online? or the output?

    Can you be more explicit? We can't see what you see, we don't know what you have.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: TRIGGERS...

    There's no difference between AFTER and FOR triggers. They're the same thing. (Reference: http://msdn.microsoft.com/en-us/library/ms178134(v=sql.105).aspx)

    Why are they treated as a single transaction? I'm not sure how to explain it, it's part...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: club to columns into one

    You can use it as a CTE as well, instead of the subquery.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Need help with a .bat for a stored procedure, please.

    I support the idea of using SSIS to have more options. You can start by reading the Stairway to Integration Services[/url].

    However, I wonder why would you use a bat file...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: TRIGGERS...

    The trigger is part of the transaction. If the trigger fails, the whole transaction fails.

    As simple as that.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: query to find timgaps between rows

    Your data was going to drive me crazy, until I realized that there was an error on the year for the variables.

    This is what I did:

    First, I created a "table"...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: club to columns into one

    Something like this would work?

    (Using the sample data provided before)

    SELECT * FROM (

    SELECT [Proc], MIN( Seq) Seq, Type AS Task

    FROM @temp

    GROUP BY [Proc], Type) A

    UNION

    SELECT [Proc], Seq, Task

    FROM @temp

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: T-SQL Help with a loop (I believe)

    Using the new data:

    SQL_Enthusiast (1/29/2013)


    For example

    CLAIM 100 had 2 CHARGE_ITEM_ID records and CLAIM 101 had 2 CHARGE_ITEM_ID records

    CLAIM 100 - CHARGE_ITEM_ID 5000 & 50550 have REVENUE_SITE_ID of 1000 and...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: T-SQL Help with a loop (I believe)

    Could you provide some sample data?

    I'm sure you can use my query by tweaking it a little, but we don't have the complete information because now you're mentioning claims.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Copy result to Excel missing "0" at front

    Format the column in Excel before it gets the data.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Copy result to Excel missing "0" at front

    Before copying, format the column as Text.

    Alternatively, you can use

    SELECT '''' + MemberID AS MemberID FROM Member

    to add an apostrophe before the string so Excel will treat it as...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: ORDER BY on Aggregate

    Shouldn't this work?

    SELECT S.agentNumber,

    MAX(S.auditdate) as auditdate,

    A.agencyName,

    A.state,

    A.region,

    A.Parent

    FROM tblAudit_Auditschedule S

    LEFT OUTER JOIN tblAgents A On A.agentNumber = s.agentNumber

    LEFT OUTER JOIN tblAgentStates R ON A.agentNumber...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Dynamic TSQL to rerun failed jobs

    Do you get job1 printed twice? or only once?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 8,161 through 8,175 (of 8,731 total)