Click here to Skip to main content
15,896,557 members
Home / Discussions / Database
   

Database

 
GeneralRe: exec @SqlString ???? Pin
boruu24-Feb-05 22:59
boruu24-Feb-05 22:59 
GeneralData Access Design Pattern: OR Mapping tools Pin
devvvy24-Feb-05 20:14
devvvy24-Feb-05 20:14 
GeneralCopy table Pin
BuddelWilli24-Feb-05 10:25
BuddelWilli24-Feb-05 10:25 
GeneralRe: Copy table Pin
Yulianto.24-Feb-05 13:33
Yulianto.24-Feb-05 13:33 
GeneralOLEDB Connection Pin
Just Greeky Creek24-Feb-05 4:02
Just Greeky Creek24-Feb-05 4:02 
GeneralRe: OLEDB Connection Pin
Yulianto.24-Feb-05 13:35
Yulianto.24-Feb-05 13:35 
GeneralRe: OLEDB Connection. <b>SOLVED</b> Pin
Just Greeky Creek24-Feb-05 20:06
Just Greeky Creek24-Feb-05 20:06 
GeneralSQL Query Problem Pin
pjholliday23-Feb-05 3:33
pjholliday23-Feb-05 3:33 
I have two tables Animal and AnimalClassification joined by a forgein key in the AnimalClassification table called HerdBookNumber. I want to count animals that have a given sire (paramSire) in each of six class types (AnimalClassification.FinalClass). The problem is that each animal could have several enteries in the AnimalClassification table and I only want the entry with the highest Lactation Number (AnimalClassification.LactationNumber) for each animal. The query below counts each entry in the AnimalClassification table not just the one with the highest lactation nubmer.
NOTE: It is not the highest LactationNumber in the AnimalClassification table but the highest LactationNumber in the AnimalClassification table for the associated animal.

SELECT COUNT(Animal.HerdBookNumber) AS Daughters, AnimalClassification.FinalClass
FROM Animal INNER JOIN AnimalClassification ON Animal.HerdBookNumber = AnimalClassification.HerdBookNumber
WHERE (((Animal.Sex)=1) AND Animal.Sire = paramSire)
GROUP BY Animal.Sire, AnimalClassification.FinalClass;

Could you please suggest how to get the information I require?
Thanks
GeneralRe: SQL Query Problem Pin
Michael Potter23-Feb-05 9:27
Michael Potter23-Feb-05 9:27 
GeneralODP.NET & MSDAORA Pin
yyf23-Feb-05 3:02
yyf23-Feb-05 3:02 
QuestionHow to import data in sql server 2000 from an excel(.xls) file Pin
tarathecasper23-Feb-05 1:59
tarathecasper23-Feb-05 1:59 
AnswerRe: How to import data in sql server 2000 from an excel(.xls) file Pin
Mike Dimmick24-Feb-05 3:07
Mike Dimmick24-Feb-05 3:07 
GeneralString Comparison in MS SQL Pin
TPN22-Feb-05 22:32
TPN22-Feb-05 22:32 
GeneralRe: String Comparison in MS SQL Pin
Colin Angus Mackay23-Feb-05 0:15
Colin Angus Mackay23-Feb-05 0:15 
GeneralRe: String Comparison in MS SQL Pin
Michael Potter23-Feb-05 9:41
Michael Potter23-Feb-05 9:41 
GeneralRe: String Comparison in MS SQL Pin
TPN23-Feb-05 16:52
TPN23-Feb-05 16:52 
GeneralCreate a new database Pin
Blue_Skye22-Feb-05 6:47
Blue_Skye22-Feb-05 6:47 
GeneralRe: Create a new database Pin
Chris Meech22-Feb-05 8:28
Chris Meech22-Feb-05 8:28 
GeneralRe: Create a new database Pin
Blue_Skye22-Feb-05 17:40
Blue_Skye22-Feb-05 17:40 
GeneralCurrent Row Index Pin
RChin22-Feb-05 6:14
RChin22-Feb-05 6:14 
GeneralRe: Current Row Index Pin
Michael Potter22-Feb-05 10:40
Michael Potter22-Feb-05 10:40 
GeneralRe: Current Row Index Pin
RChin22-Feb-05 22:48
RChin22-Feb-05 22:48 
GeneralMSDE2000A Pin
caoquanghanh22-Feb-05 0:05
caoquanghanh22-Feb-05 0:05 
Generalabout autherization Pin
Allah Kaa Bandaa21-Feb-05 22:10
Allah Kaa Bandaa21-Feb-05 22:10 
Generalstrange problem using ado to add record Pin
Dababa21-Feb-05 15:57
Dababa21-Feb-05 15:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.