Click here to Skip to main content
15,917,709 members
Home / Discussions / Database
   

Database

 
QuestionShow Databases ? Pin
Fritzables9-Mar-08 13:35
Fritzables9-Mar-08 13:35 
AnswerRe: Show Databases ? Pin
Paul Conrad9-Mar-08 13:40
professionalPaul Conrad9-Mar-08 13:40 
GeneralRe: Show Databases ? Pin
Fritzables9-Mar-08 14:19
Fritzables9-Mar-08 14:19 
Generali want to encrypt password Pin
Mahdi_kishislan9-Mar-08 11:27
Mahdi_kishislan9-Mar-08 11:27 
GeneralRe: i want to encrypt password Pin
buchstaben9-Mar-08 11:47
buchstaben9-Mar-08 11:47 
GeneralRe: i want to encrypt password Pin
CodingYoshi9-Mar-08 13:41
CodingYoshi9-Mar-08 13:41 
GeneralRe: i want to encrypt password Pin
Paul Conrad9-Mar-08 13:42
professionalPaul Conrad9-Mar-08 13:42 
QuestionGetting the Top 1 record while using inner join Pin
ONeil Tomlinson9-Mar-08 10:50
ONeil Tomlinson9-Mar-08 10:50 
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 an employee

##################################################
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 in a freak case, if an employee has multipe career and all record for that person 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?
AnswerRe: Getting the Top 1 record while using inner join Pin
buchstaben9-Mar-08 11:45
buchstaben9-Mar-08 11:45 
GeneralRe: Getting the Top 1 record while using inner join Pin
ONeil Tomlinson9-Mar-08 13:16
ONeil Tomlinson9-Mar-08 13:16 
Generaltrigger after delete Pin
haytham_mohammad9-Mar-08 8:31
haytham_mohammad9-Mar-08 8:31 
GeneralRe: trigger after delete Pin
pmarfleet9-Mar-08 9:33
pmarfleet9-Mar-08 9:33 
GeneralRe: trigger after delete Pin
haytham_mohammad9-Mar-08 9:40
haytham_mohammad9-Mar-08 9:40 
GeneralRe: trigger after delete Pin
pmarfleet9-Mar-08 9:59
pmarfleet9-Mar-08 9:59 
GeneralRe: trigger after delete Pin
haytham_mohammad9-Mar-08 10:03
haytham_mohammad9-Mar-08 10:03 
Generallogical sum in ms sql2005 Pin
Seishin#9-Mar-08 3:30
Seishin#9-Mar-08 3:30 
AnswerRe: logical sum in ms sql2005 Pin
Seishin#9-Mar-08 3:39
Seishin#9-Mar-08 3:39 
GeneralDSN Pin
simworld9-Mar-08 3:07
simworld9-Mar-08 3:07 
QuestionHow to port mysql database to SQL Server database Pin
Eng Mohammed Osman9-Mar-08 0:20
Eng Mohammed Osman9-Mar-08 0:20 
AnswerRe: How to port mysql database to SQL Server database Pin
pmarfleet9-Mar-08 0:27
pmarfleet9-Mar-08 0:27 
Generalregarding mdf files Pin
mrcsn8-Mar-08 17:10
mrcsn8-Mar-08 17:10 
GeneralRe: regarding mdf files Pin
Christian Graus8-Mar-08 22:37
protectorChristian Graus8-Mar-08 22:37 
GeneralRe: regarding mdf files Pin
ChandraRam10-Mar-08 0:57
ChandraRam10-Mar-08 0:57 
GeneralRe: regarding mdf files Pin
ChandraRam10-Mar-08 0:58
ChandraRam10-Mar-08 0:58 
GeneralRe: regarding mdf files Pin
mrcsn10-Mar-08 1:38
mrcsn10-Mar-08 1:38 

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.