Viewing 15 posts - 26,446 through 26,460 (of 26,486 total)
Here is an update of what I have done:
set nocount on
create table dbo.SchoolAttendance(
AttendanceRuID int,
StudentID int,
AttendanceDate datetime,
AttendanceTyID int,
RollupCount int,
termID int null
)
create table dbo.SchoolAttendanceTy (
AttendanceTyID...
July 18, 2006 at 2:09 pm
I'm sorry, but I don't see how your code solves the problem. You still have a condition in the where clause checking for StudentID = 169. The table SchoolAttendanceTy does...
July 18, 2006 at 2:03 pm
stax68,
Everything I used is in my big post. Add where sa.StudentID = 169 to the where clause and you will reduce the result set displayed in my post by 1...
July 18, 2006 at 1:44 pm
I just figured out the problem. Your where clause contains sar.studentID = 169.
The line with AttendanceTyID = 2 is null in the column, and fails the where condition.
Change it to...
July 18, 2006 at 1:30 pm
I took what you posted (I don't see CompanyID anywhere, so I left it off) and did the following:
set nocount on
create table dbo.SchoolAttendance(
AttendanceRuID int,
StudentID int,
AttendanceDate datetime,
AttendanceTyID...
July 18, 2006 at 1:19 pm
Please try dropping the termId is null from the where clause using the query stax68 gave you. What does that return?
Lynn
July 18, 2006 at 10:57 am
Colin,
Try the following, you will see that the table variable still has data after the rollback.
This can only mean that the insert to the table var inside the begin transaction...
July 18, 2006 at 9:40 am
Looks like this job is part of a maintenacne plan. Do delete it, you will probably need to modify the plan.
July 18, 2006 at 9:27 am
Not sure, but if you deny the SA or Sys Admin from view database objects (databases, tables, etc), doesn't that mean you don't need a Sys Admin or SA? A...
July 18, 2006 at 9:26 am
First problem, SchoolAttendanceType is on the right, not left. Try a right outer join. You may also want to drop the termId is null in the where clause.
hth,
Lynn
July 18, 2006 at 9:18 am
table vars are also faster as inserts/deletes/updates to table vars are not logged.
Lynn
July 17, 2006 at 4:21 pm
It looks like you wanted a Windows collation during installation, but selected a SQL collation instead. I can not find any windows collations that look like this: latin1_general_CP1_CI_AS. The CP...
July 17, 2006 at 2:15 pm
It may help to look at the views and tables being used. As the SQL for these may be extensive, if you send me a private email (PM), I can...
July 17, 2006 at 10:52 am
Check the size of your database in production, including the transaction log. Not sure, but SQL Backup may be making an assumption based on the physical size of the database. ...
July 14, 2006 at 10:54 am
Make this change and play with it some. I changed from a cross join to an inner join:
create table Table1 (
Part char(10) constraint pk_table1 primary key,
Descr varchar(20),
Sales ...
July 14, 2006 at 10:22 am
Viewing 15 posts - 26,446 through 26,460 (of 26,486 total)