Click here to Skip to main content
15,908,674 members
Home / Discussions / Database
   

Database

 
QuestionConnect to Remote Server [modified] Pin
#realJSOP27-Mar-10 4:05
professional#realJSOP27-Mar-10 4:05 
AnswerRe: Connect to Remote Server Pin
i.j.russell27-Mar-10 8:10
i.j.russell27-Mar-10 8:10 
GeneralRe: Connect to Remote Server Pin
#realJSOP27-Mar-10 8:29
professional#realJSOP27-Mar-10 8:29 
GeneralRe: Connect to Remote Server Pin
i.j.russell27-Mar-10 8:52
i.j.russell27-Mar-10 8:52 
GeneralRe: Connect to Remote Server Pin
#realJSOP28-Mar-10 0:38
professional#realJSOP28-Mar-10 0:38 
GeneralRe: Connect to Remote Server Pin
i.j.russell28-Mar-10 1:12
i.j.russell28-Mar-10 1:12 
GeneralRe: Connect to Remote Server Pin
#realJSOP28-Mar-10 3:32
professional#realJSOP28-Mar-10 3:32 
QuestionConditional field in SQL query Pin
Dewald26-Mar-10 2:13
Dewald26-Mar-10 2:13 
Could someone help me with this one perhaps?

Let's say I have a simple SQL query like:
SELECT EmployeeID, EmployeeName, YearStarted FROM Employees


I'd like to return a fourth column in the result set of which the value is conditional upon the value of another column. For instance, if the value of YearStarted is older than 2007, return 'veteran' otherwise return 'spring chicken'.

I'm thining something like:
SELECT EmployeeID, EmployeeName, YearStarted, IF(YearStarted<2007,'Veteran','Spring Chicken') FROM Employees

but obviously such an IF statement doesn't exist in SQL. Is there another way to do it?
AnswerRe: Conditional field in SQL query Pin
R. Giskard Reventlov26-Mar-10 2:21
R. Giskard Reventlov26-Mar-10 2:21 
GeneralRe: Conditional field in SQL query Pin
Dewald26-Mar-10 2:37
Dewald26-Mar-10 2:37 
QuestionMessage Removed Pin
25-Mar-10 14:24
T210225-Mar-10 14:24 
AnswerRe: list of valid SQL functions for querying CSV file with ADO .NET Pin
PIEBALDconsult25-Mar-10 14:59
mvePIEBALDconsult25-Mar-10 14:59 
QuestionWhich SQL edition to install in win 7 ultimate? Pin
Farhad Eft25-Mar-10 6:04
Farhad Eft25-Mar-10 6:04 
AnswerRe: Which SQL edition to install in win 7 ultimate? Pin
R. Giskard Reventlov25-Mar-10 6:16
R. Giskard Reventlov25-Mar-10 6:16 
QuestionRe: Which SQL edition to install in win 7 ultimate? Pin
Farhad Eft25-Mar-10 10:45
Farhad Eft25-Mar-10 10:45 
AnswerRe: Which SQL edition to install in win 7 ultimate? Pin
Mycroft Holmes25-Mar-10 14:41
professionalMycroft Holmes25-Mar-10 14:41 
QuestionAccess Database is omitting the very first record and it returns the rest of the records Pin
tiagu25-Mar-10 3:53
tiagu25-Mar-10 3:53 
AnswerRe: Access Database is omitting the very first record and it returns the rest of the records Pin
Luc Pattyn25-Mar-10 6:39
sitebuilderLuc Pattyn25-Mar-10 6:39 
AnswerRe: Access Database is omitting the very first record and it returns the rest of the records Pin
PIEBALDconsult25-Mar-10 15:01
mvePIEBALDconsult25-Mar-10 15:01 
Questionneed good database structure for tracking counter state Pin
aki.oki25-Mar-10 2:54
aki.oki25-Mar-10 2:54 
AnswerRe: need good database structure for tracking counter state Pin
Mycroft Holmes25-Mar-10 14:49
professionalMycroft Holmes25-Mar-10 14:49 
QuestionUnable to Start MSSQL SERVER Pin
astrovirgin25-Mar-10 2:51
astrovirgin25-Mar-10 2:51 
AnswerRe: Unable to Start MSSQL SERVER Pin
R. Giskard Reventlov25-Mar-10 2:59
R. Giskard Reventlov25-Mar-10 2:59 
GeneralRe: Unable to Start MSSQL SERVER Pin
astrovirgin25-Mar-10 3:29
astrovirgin25-Mar-10 3:29 
GeneralRe: Unable to Start MSSQL SERVER Pin
R. Giskard Reventlov25-Mar-10 4:25
R. Giskard Reventlov25-Mar-10 4:25 

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.