Viewing 15 posts - 76 through 90 (of 113 total)
I'm not sure i follow the problem...the SQL you posted should return exactly what you are looking for. The problem may be in how you are putting the data...
February 23, 2011 at 12:48 pm
Couldn't you just do a COUNT/HAVING approach?
Select Field1, Field2, COUNT(*) AS Records
FROM SUMMARY_TABLE
GROUP BY Field1, Field2
HAVING COUNT(*) > 1
That will identify the multiple occurrences and from there you can resolve...
February 23, 2011 at 12:42 pm
no those won't work. they are used to allow you to insert the identity values in your SQL INSERT statements.
You need to alter the table and redefine the field...
February 23, 2011 at 12:40 pm
You could use a table valued function instead of a view. That would return a table.
On a different note, have you thought of just defining the server Aliases differently...
February 23, 2011 at 12:38 pm
here ya go...
Update Contact
Set Temp = 'on course'
FROM wce_course_delegate_link_2 AS d
INNER...
February 23, 2011 at 12:33 pm
Yes the data warehouse is often considered the database. However, the surrounding systems are often referred to by end users as the data warehouse.
February 23, 2011 at 12:28 pm
Without knowing the reason you need a dynamic IN operation, your solution to avoid Dynamic SQL is fine. That being said, the creation / insertion / deltion of the...
February 23, 2011 at 6:48 am
You also have a join using the same field on both sides of the equation (Cartesian):
IM.Item_ID = IM.Item_ID
That's gonna hurt ya.
February 22, 2011 at 5:53 am
You are also using the DATEPART function to just get the day, but in your example data you want the date. If you want to strip off the time...
February 22, 2011 at 5:50 am
SQL can recompile specific lines within a stored procedure, which is what I think you are experiencing here. I would not worry about it unless there is a performance...
February 11, 2011 at 10:21 am
To answer the question (Is there something I should worry about)...I would say no...mostly. SQL Server will not keep multiple plans in the cache. This means that you...
February 11, 2011 at 6:33 am
Let me start by saying this is pretty difficult to debug without more knowledge of the procedure and the changes you made.
That said for the dynamic SQL, you should be...
February 9, 2011 at 11:35 am
Are you looking to get a list of all the records or are you planning on adding a WHERE clause above and beyond your "show me the latest FirstTime" for...
February 7, 2011 at 1:44 pm
Lowell's is better than mine as it takes the possibility of not having a history record into account. Heh heh.
February 1, 2011 at 1:31 pm
we can't really give you the SQL to use as we don't have the table structures, however assuming that EmpID is the key in your EmpTable and that EmpHistory has...
February 1, 2011 at 1:29 pm
Viewing 15 posts - 76 through 90 (of 113 total)