Forum Replies Created

Viewing 15 posts - 1 through 15 (of 44 total)

  • RE: Incremental value for field using INSERT

    Assuming that you really do need to do this, what about using a cursor?

    CREATE PROCEDURE FinancialAidAwardReformat

    AS SET NOCOUNT ON

    DECLARE @StudentID  char(9)

    DECLARE @Lastname varchar(50)

    DECLARE @Firstname varchar(50)

    DECLARE @FiscalYear char(9)

    DECLARE @Field3 int

    SELECT @Field3...

  • RE: Return identity inserted

    Set an output parameter and pass the identity value to it, as follows:

    CREATE PROCEDURE upd_DLCourseOneStudent

     @SocialSecurityNumber char(9),

     @CourseNumber varchar(50),

     @Semester  varchar(50),

     @NoOfCredit tinyint, 

     @DLCourseID int OUTPUT

    INSERT INTO tblDLCourses

     (SocialSecurityNumber,

     CourseNumber,

     Semester,

     NoOfCredit)

    VALUES 

     (@SocialSecurityNumber,

     @CourseNumber,

     @Semester,

     @NoOfCredit)

     SET @DLCourseID = @@IDENTITY

     

  • RE: Best Practices for Database Design

    For reference tables, I use a suffix of "Lookup".  Had I to do it over again, I would have used a special prefix instead so that the lookup tables would...

  • RE: Best Practices for Database Design

    Regarding the post "A lot of places require the use of stored procedures for data access, and use prefixes of sps_, spi_, spu_ and spd_ which potentially clashes with system...

  • RE: Best Practices for Database Design

    I agree with some of the ideas in the article, but I hate underscores in table field names.  Capitalizing each word within the name is just as readable and much easier...

  • RE: HELP RESTORE DROPPED TABLE!!!

    We back up our transaction log every fifteen minutes during the business day and do a full backup every night when the system is quiet.  Admittedly our database is fairly...

  • RE: how to backp or copy my stored procedures to another server

    If you have Enterprise Manager, you could script the SP's and then play back the script on the new server.

    To script, right click on the database, select "All Tasks", then...

  • RE: Creating an Access table from SQL Query Analyzer

    Why not keep copies of the transaction records in a permanent SQL table instead of destroying or discarding them once the Master table has been updated?  How did Access get...

  • RE: Column width

    What page?  Are you in Query Analyzer?  We need more information.

  • RE: Backup Problem

    Is SQL Agent running?  If it is not running, your job won't start.

  • RE: pls reply to my problem

    It would help if your subject heading gave a clue as to what your problem is.  "Serious Problem" could be anything from a coding error to a flat tire!

    How about...

  • RE: object browser displaying unwanted stuff in query analzyer

    Make sure you set the user's default database to be a database OTHER THAN Master.  That way, Master will not show in Query Analyzer unless explicitly chosen.

  • RE: Import Word 2000 document data into SQL Server tables using XML - HOW? HELP!

    Maybe it's time to upgrade your Microsoft Office to the Professional version of 2003, which does have XML capabilities.

  • RE: Datetime grouping question

    If at all possible, try to avoid giving fields the same name as a "reserved" word like "datetime" - it makes for very confusing code.  Does the stored procedure even...

  • RE: Can a report have a dynamic DSN?

    If your reporting product is Crystal, you can reset the data source at runtime from the front end.  If all you want to do is change the DSN, then you...

Viewing 15 posts - 1 through 15 (of 44 total)