Click here to Skip to main content
15,919,749 members
Home / Discussions / Database
   

Database

 
GeneralSql Server Reporting Services report problem [modified] Pin
Andrei Ungureanu10-Mar-08 2:53
Andrei Ungureanu10-Mar-08 2:53 
GeneralRe: Sql Server Reporting Services report problem Pin
Paddy Boyd10-Mar-08 3:11
Paddy Boyd10-Mar-08 3:11 
GeneralRe: Sql Server Reporting Services report problem Pin
Andrei Ungureanu10-Mar-08 3:20
Andrei Ungureanu10-Mar-08 3:20 
GeneralRe: Sql Server Reporting Services report problem Pin
Andrei Ungureanu10-Mar-08 3:32
Andrei Ungureanu10-Mar-08 3:32 
GeneralQuerying from an Excel Workbook using OleDbAdapter Pin
moon_stick10-Mar-08 1:37
moon_stick10-Mar-08 1:37 
QuestionQuery to Copy a table from one database to another Pin
Krazy Programmer10-Mar-08 1:23
Krazy Programmer10-Mar-08 1:23 
GeneralRe: Query to Copy a table from one database to another Pin
Blue_Boy10-Mar-08 1:45
Blue_Boy10-Mar-08 1:45 
QuestionGetting records while using inner join Pin
ONeil Tomlinson10-Mar-08 0:49
ONeil Tomlinson10-Mar-08 0:49 
I have 3 Tables (Person-1------1->Employee-1------*>Career)
an employee can have multiple Career. I created the sql statement below
to return some information on about 200 employees

##################################################
select p.FamilyName,
p.AddressLine1,
Career.CareerDescription
from Person as p
inner join Employee on Employee.EmployeeID =p.PersonID
inner join Career on Employee.UniqueIdentifier = Career.ParentIdentifier and Career.PrimaryPostYN = 'Y'

###############################################

The "Career.PrimaryPostYN = Y" indicates which Post is active for an employee with multiple Career.
So only one post should be active at any one time. All other should be set to "Career.PrimaryPostYN = N"


QUESTION:
If an employee has multipe Career and all his career entries is set to "Career.PrimaryPostYN = Y". In such a case i want to return the first case where "Career.PrimaryPostYN = Y"
How do i alter the above statement to do this while returning information for all other employee. I tried "top 1" but that only returned 1 record out of the 200?
GeneralRe: Getting records while using inner join Pin
Colin Angus Mackay10-Mar-08 1:46
Colin Angus Mackay10-Mar-08 1:46 
GeneralRe: Getting records while using inner join Pin
ONeil Tomlinson10-Mar-08 2:30
ONeil Tomlinson10-Mar-08 2:30 
GeneralRe: Getting records while using inner join Pin
Colin Angus Mackay10-Mar-08 5:00
Colin Angus Mackay10-Mar-08 5:00 
GeneralRe: Getting records while using inner join Pin
ONeil Tomlinson10-Mar-08 5:21
ONeil Tomlinson10-Mar-08 5:21 
QuestionIs it possible to fire message from Stored procedure? Pin
Sipder9-Mar-08 23:11
Sipder9-Mar-08 23:11 
AnswerRe: Is it possible to fire message from Stored procedure? Pin
Colin Angus Mackay9-Mar-08 23:41
Colin Angus Mackay9-Mar-08 23:41 
GeneralRe: Is it possible to fire message from Stored procedure? Pin
Sipder10-Mar-08 0:01
Sipder10-Mar-08 0:01 
GeneralRe: Is it possible to fire message from Stored procedure? Pin
Colin Angus Mackay10-Mar-08 0:20
Colin Angus Mackay10-Mar-08 0:20 
GeneralRe: Is it possible to fire message from Stored procedure? Pin
Sipder10-Mar-08 4:20
Sipder10-Mar-08 4:20 
GeneralRe: Is it possible to fire message from Stored procedure? Pin
Colin Angus Mackay10-Mar-08 5:03
Colin Angus Mackay10-Mar-08 5:03 
GeneralRe: Is it possible to fire message from Stored procedure? Pin
Sipder10-Mar-08 18:35
Sipder10-Mar-08 18:35 
GeneralStored Procedure for Checking Login Table Pin
codingrocks9-Mar-08 16:44
codingrocks9-Mar-08 16:44 
GeneralRe: Stored Procedure for Checking Login Table Pin
Ravenet9-Mar-08 17:54
Ravenet9-Mar-08 17:54 
GeneralRe: Stored Procedure for Checking Login Table Pin
Colin Angus Mackay9-Mar-08 23:44
Colin Angus Mackay9-Mar-08 23:44 
GeneralRe: Stored Procedure for Checking Login Table Pin
Christian Graus9-Mar-08 19:31
protectorChristian Graus9-Mar-08 19:31 
GeneralConnected Vs. Disconnected Pin
CodingYoshi9-Mar-08 13:39
CodingYoshi9-Mar-08 13:39 
GeneralRe: Connected Vs. Disconnected Pin
Paul Conrad9-Mar-08 13:43
professionalPaul Conrad9-Mar-08 13:43 

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.