Forum Replies Created

Viewing 15 posts - 6,481 through 6,495 (of 15,381 total)

  • RE: How to execute stored proc iin a loop for a date range

    sqlblue (10/17/2013)


    Thanks for responding. I need to execute the stored procedure in batches either through a while loop or some kind of table with identity column, but I don't...

  • RE: Who talks SQL out of work...

    SQLBill (10/17/2013)


    My wife doesn't want to hear about it. But interestly enough, she goes on and on about her work and expects me to be interested. She really...

  • RE: How to execute stored proc iin a loop for a date range

    sqlblue (10/17/2013)


    I have a stored procedure that needs to be called to update a table inside for a large date range (millions of records), but I wanted this stored procedure

    to...

  • RE: Can I avoid RBAR in the following scenario

    Resender (10/17/2013)


    Sean Lange (10/17/2013)


    How about some ddl and sample data? This doesn't sound too bad but without something to work with I have a hard time visualizing it, and it...

  • RE: Column name or number of supplied values does not match table definition

    Let's start with formatting this sql into something legible.

    ALTER PROCEDURE [dbo].[SaveBSPOutageInfo] @eventCreatedDate DATETIME

    ,@eventOrigin VARCHAR(10)

    ,@eventType VARCHAR(10)

    ,@alert_Type VARCHAR(10)

    ,@outageComponent VARCHAR(10)

    ,@remedyTicket VARCHAR(15)

    ,@Severity_Cd VARCHAR(2)

    ,@Status_Cd VARCHAR(2)

    ,@Planned_Outage_Ind VARCHAR(1)

    ,@Outage_Start_Time DATETIME

    ,@Impacted_800_Num VARCHAR(200)

    ,@Bus_Hrs_Ind VARCHAR(1)

    ,@Expected_End_Time DATETIME

    ,@Actual_End_Time DATETIME

    ,@Addl_Steps VARCHAR(2000)

    ,@BSP_Name VARCHAR(30)

    ,@Caller VARCHAR(30)

    ,@Phone VARCHAR(12)

    ,@Internal_Comments...

  • RE: Can I avoid RBAR in the following scenario

    How about some ddl and sample data? This doesn't sound too bad but without something to work with I have a hard time visualizing it, and it is nearly impossible...

  • RE: Pass a table variable column value to a SP output variable

    Junglee_George (10/17/2013)


    If you have understood the problem, please write the code for the solution. I am working for almost a week on this. Thank You.

    I can't write the code. I...

  • RE: View with EXISTS

    ikrami2000 (10/16/2013)


    Thanks 🙂 , this is exactly what i want

    You are quite welcome. I would caution you that there are a few things in that code that I would recommend...

  • RE: Just installed SQL Express and...

    p.s. Sean - that snippet viewer is still saving my life.

    😉 Glad to hear it is working for you. I use it pretty frequently myself.

  • RE: Just installed SQL Express and...

    Jeff Atherton (10/16/2013)


    Sean Lange (10/16/2013)


    btw, not sure what the previous poster was complaining about. SQLExpress is free and is a great tool, especially for learning when you don't have access...

  • RE: Is there a way to do this?

    krypto69 (10/16/2013)


    Hi,

    I am using the query below and am getting back four 'Gary' records. Which I understand why that's correct for the way I have it written.

    But what I...

  • RE: Getting Total Count for each month based on the Start and End Date

    LutzM (10/16/2013)


    Just as a side note:

    Whenever dealing with a date type in character format, I'd prefer the ISO format 'YYYYMMDD', so '20131015' instead of '10/15/2013'

    +10000 to that.

    I should have...

  • RE: Just installed SQL Express and...

    erikd (10/16/2013)


    I'm looking for some direction.

    I did it because I'm reading The Accidental DBA in an effort to branch out beyond the T-SQL stuff I've been kind of limited...

  • RE: Getting Total Count for each month based on the Start and End Date

    Assuming FlightDate is a datetime data type you could use this.

    SELECT Month(FlightDate) as Month,

    COUNT (PaxNum) as TotalPassengersCount

    FROM dbo.FlightDetails

    WHERE FlightDate BETWEEN '1/1/2013' and '10/15/2013'

    GROUP BY...

  • RE: rollback code -revisited

    Guras (10/16/2013)


    I have the following rollback code in cascaded sp does this work?

    CREATE Procedure SP1

    AS

    BEGIN TRAN TRAN1

    BEGIN TRY

    Update Table1

    exec childsp1

    END TRY

    BEGIN...

Viewing 15 posts - 6,481 through 6,495 (of 15,381 total)