Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 record count confusion

Author  Topic 

fisheromacs
Starting Member

2 Posts

Posted - 2007-05-30 : 13:14:45
I have been assigned to fix a script which i did not write and that is not in SQL, but calls to SQL to get it's results.

It reads from a payroll table in SQL with 943 total records (of which about 280 are active employees).

When i run the script, i receive a series of errors listing the field that the error is in (ie: Badge or PayRule) and the record # causing the error.

My problem is that the 1st record # that returns an error is #946. I get a total of 45 records that generate errors of this sort. (ie: #946-957 Badge, 1154-1159 Badge, 1482-1497 PayRule, 1562-1568 Badge, 2083-2086 PayRule).

IF i can figure out which employee those records belong to I will have a much better chance of finding the cause of the errors and correcting them.

When it gives a record #, i always thought it was the row in the table that was referred to, but since the record #'s i am receiving are larger than the number of rows in the table, i am utterly confused!

So...i guess my question is, how do I count the records if not by row?

thanks in advance, and i hope this makes sense!

ed c

nr
SQLTeam MVY

12543 Posts

Posted - 2007-05-30 : 13:18:11
It's not sql server producing those error messages. You'll have to look at the script and see where they are produced.
You can probably change the error messages to include the employee.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

fisheromacs
Starting Member

2 Posts

Posted - 2007-05-30 : 13:30:19
thank you for the quick reply.
obviously i am a beginner at all of this!
i will look elsewhere (not in SQL) to try and figure it out.
ed c
Go to Top of Page
   

- Advertisement -