Viewing 15 posts - 16 through 30 (of 38 total)
I am hoping you have some unique key that you use to clearly differentiate some of the records. To make things a little easier to read I added a RowId...
April 8, 2010 at 1:30 pm
Instead of trying to make the values safe during the calculation, test to see if they will work before doing the calculation. If not, simply return a null or some...
April 8, 2010 at 12:56 pm
i want to check if both rows not exists then do the if.
i need to check for 2 rows in that column if they not exists do something.
the rows will...
April 8, 2010 at 12:19 pm
Use an ActiveX Script Task to check the DateLastModified of the file. If it meets your criteria use the Send Mail Task to send your message.
Couple of links to...
April 6, 2010 at 11:55 am
No, it is not required that the Primary Key is the clustered index. Proof of concept code follows.
Create Table dbo.KeyTest
(
TestId Int Identity(1, 1) Not Null,
TestCode NChar(3)...
April 4, 2010 at 12:24 am
Sure. Just change the parameter type.
Declare @StartDate Date;
....
-- Build the CTEs to hold your unpivoted data.
With WeeklyReport (IncidentType, Incidents)
As
(
...
April 2, 2010 at 11:34 pm
They start Saturday - Friday, Then Saturday through Friday, etc
Based off of this I am guessing that you will have standard weeks and that the sample data overlapping was...
April 2, 2010 at 1:22 pm
I'm going to try and address things in smaller chunks. To cover everything at once can be a bit lengthy and confusing.
Sorry, I'll try and define what I mean...
April 2, 2010 at 11:17 am
I have tried that, yes. However, what that gets me is all 189 FormNames for each ClassCode.
Sounds like either a cross join or maybe a full join. The outer join...
April 1, 2010 at 9:30 pm
Couple of questions.
1. How do you define "Reporting Week"? Is each record considered a reporting week? I didn't see any other mechanism for keeping track of your weeks otherwise....
April 1, 2010 at 4:58 pm
Actually, the first table in the FROM clause needs to be the table that you are updating, so use:
This is not correct. For this process ordering does not matter....
March 31, 2010 at 12:55 pm
You're almost there. Just missing the From clause to join the tables. When I have a query with multiple tables I tend to use aliases. Personal preference, it isn't required....
March 30, 2010 at 5:46 pm
Ok. I think I finally understand the full picture.
Select C.ClassName, SubQuery.RegType, SubQuery.RegStatus,
COALESCE(SubQuery.NumofReg, 0) As [NumOfReg], C.EnrollLimit
From Classes As C
Left Join
(
Select Class, RegType, RegStatus,...
March 30, 2010 at 4:52 pm
Not exactly sure what you mean. Based off of your create script and Lowell's selection script I was getting expected results.
ClassName,EnrollLimit,RegType,RegStatus,Class,NumofReg
Class1,10,STUDENT,<< Not Set >>,Class1,4
Class1,10,STUDENT,<< Not Set >>,Class1,4
Class1,10,TEACHER,<< Not Set...
March 30, 2010 at 3:19 pm
I'm a bit surprised to hear that the last one didn't return any results for you. Sorry about that. Thought I did a quick sample test before posting code...
If...
March 30, 2010 at 11:57 am
Viewing 15 posts - 16 through 30 (of 38 total)