Forum Replies Created

Viewing 15 posts - 451 through 465 (of 1,086 total)

  • RE: How to structure/organize for ease of maintenance?

    Let's look at this backwards.  You have a known structure for a final output table, [Project, various ErrType counts].  Rather than use a CURSOR to run each of the six...

    I wasn't born stupid - I had to study.

  • RE: How to structure/organize for ease of maintenance?

    While most of your explanation is thorough and well stated, I am a bit confused on your question.  Do you want one SP, so you can change it if needs...

    I wasn't born stupid - I had to study.

  • RE: Creating Script - date fields in two columns

    This is the correct approach if in fact both fields are always the same...  

     

     

    I wasn't born stupid - I had to study.

  • RE: Software Question

    I agree with Jo!  Have them do it with Access and then perform a dual report for the "more complicated" easy reports and show them how their results may conflict...

    I wasn't born stupid - I had to study.

  • RE: Returning single row from multiple rows

    I agree with rsharma.  I was not sure if there was a finite set, hence the clunky dynamic sql approach.  If you have a finite set, I would follow that...

    I wasn't born stupid - I had to study.

  • RE: Returning single row from multiple rows

    This 'may' work, but it is much more helpful when you supply us with sample data. 

    The -- PRINT @sql statements should help...

    I wasn't born stupid - I had to study.

  • RE: Creating Script - date fields in two columns

    I was working under the assumption that you were doing this from Query Analyzer with the database already defined.  Where are you planning on running this statement? 

     

    I wasn't born stupid - I had to study.

  • RE: how to write sql select with min/max?

    Gald to help.

    I wasn't born stupid - I had to study.

  • RE: Creating Script - date fields in two columns

    UPDATE TableName SET

         CoumnB = ColumnA

     

    [Note: this update will change the all of the values for ColumnB since there is no WHERE statment.  Is this what you want?] 

     

    I wasn't born stupid - I had to study.

  • RE: how to write sql select with min/max?

    DECLARE @t TABLE( Resource varchar(25), Task varchar(10), TaskStart smalldatetime, TaskEnd smalldatetime)

    INSERT INTO @t

    SELECT 'John Doe', 'task1a', '09/01/05', '12/01/05' UNION ALL

    SELECT 'John Doe', 'task1c', '8/01/05', '10/01/05' UNION ALL

    SELECT 'Sue...

    I wasn't born stupid - I had to study.

  • RE: OH MY!

    Noel beat me to the punch. 

    ALTER PROCEDURE My_First_Transaction

              @FirstName varchar (50),

              @LastName varchar (50)

    AS

    BEGIN TRANSACTION

         INSERT INTO Employees( FirstName, LastName) VALUES( @FirstName,@LastName)

         IF...

    I wasn't born stupid - I had to study.

  • RE: Definitively not SQL

    One hour. 

    I wasn't born stupid - I had to study.

  • RE: Is there a better way?

    You should always have an ELSE when using IF's...    

     

     

    I wasn't born stupid - I had to study.

  • RE: Is there a better way?

    Sorry.  I did not read that closely enough.  (being a bit of a doooomas, I guess...)   

    Since you need to name each return...

    I wasn't born stupid - I had to study.

  • RE: Question on stored procedure

    What is the datatype of FullName and why did you select nvarchar for your @FullName variable? 

     

     

    I wasn't born stupid - I had to study.

Viewing 15 posts - 451 through 465 (of 1,086 total)