Viewing 15 posts - 1 through 15 (of 44 total)
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...
April 20, 2005 at 10:08 am
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
April 20, 2005 at 9:45 am
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...
April 6, 2005 at 7:37 am
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...
April 6, 2005 at 7:33 am
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...
April 6, 2005 at 6:36 am
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...
May 28, 2004 at 10:59 am
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...
May 17, 2004 at 8:42 am
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...
May 7, 2004 at 1:21 pm
What page? Are you in Query Analyzer? We need more information.
April 30, 2004 at 6:17 am
Is SQL Agent running? If it is not running, your job won't start.
April 29, 2004 at 12:43 pm
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...
April 27, 2004 at 7:38 am
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.
April 22, 2004 at 8:00 am
Maybe it's time to upgrade your Microsoft Office to the Professional version of 2003, which does have XML capabilities.
April 22, 2004 at 6:37 am
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...
April 16, 2004 at 6:47 am
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...
April 16, 2004 at 6:43 am
Viewing 15 posts - 1 through 15 (of 44 total)