Click here to Skip to main content
15,888,351 members
Home / Discussions / Database
   

Database

 
GeneralRe: How to select records between ( 10 to 100) Pin
Logup17-Jun-08 7:56
Logup17-Jun-08 7:56 
AnswerRe: How to select records between ( 10 to 100) Pin
Alsvha17-Jun-08 5:39
Alsvha17-Jun-08 5:39 
QuestionStored Procedure, Commiting Changes Pin
Ian Uy17-Jun-08 3:30
Ian Uy17-Jun-08 3:30 
AnswerRe: Stored Procedure, Commiting Changes Pin
Ashfield17-Jun-08 3:50
Ashfield17-Jun-08 3:50 
GeneralRe: Stored Procedure, Commiting Changes Pin
Ian Uy17-Jun-08 4:34
Ian Uy17-Jun-08 4:34 
Questionasp.net insert data Pin
sonalisharma17-Jun-08 2:35
sonalisharma17-Jun-08 2:35 
AnswerRe: asp.net insert data Pin
Colin Angus Mackay17-Jun-08 3:08
Colin Angus Mackay17-Jun-08 3:08 
QuestionComplex SQL query... [modified] Pin
ruanr16-Jun-08 22:19
ruanr16-Jun-08 22:19 
SQL novice here..

Hi, I'm having trouble formulating an SQL query and tbh I'm not even sure if its possible to do what I'm trying to do [without a cursor].

I have two tables with a standard 1->M relationship. If a certain field in ALL the linked records are set to a certain value, I need to update a field in the parent record, if the field is set to a different value in one of the linked records, i do nothing. How should I phrase the query?

Edit for clarification: Lets say it is a Client table, with a related Tasks table, and the intermediate ClientTasks table. If all the Tasks related to a Client are marked as done, I need to update a field in the Client's record to mark the client as having no outstanding tasks.

Thanks in advance..

modified on Tuesday, June 17, 2008 4:26 AM

AnswerRe: Complex SQL query... Pin
joemonvarghese80@yahoo.co.in16-Jun-08 22:24
joemonvarghese80@yahoo.co.in16-Jun-08 22:24 
GeneralRe: Complex SQL query... Pin
ruanr16-Jun-08 22:29
ruanr16-Jun-08 22:29 
GeneralRe: Complex SQL query... Pin
joemonvarghese80@yahoo.co.in16-Jun-08 22:55
joemonvarghese80@yahoo.co.in16-Jun-08 22:55 
AnswerRe: Complex SQL query... Pin
Ashfield16-Jun-08 23:58
Ashfield16-Jun-08 23:58 
Questionconvert Pin
trilokharry16-Jun-08 21:40
trilokharry16-Jun-08 21:40 
AnswerRe: convert Pin
joemonvarghese80@yahoo.co.in16-Jun-08 22:27
joemonvarghese80@yahoo.co.in16-Jun-08 22:27 
AnswerRe: convert Pin
Krish - KP16-Jun-08 22:32
Krish - KP16-Jun-08 22:32 
AnswerRe: convert Pin
Ashfield16-Jun-08 22:44
Ashfield16-Jun-08 22:44 
AnswerRe: convert Pin
Mike Dimmick17-Jun-08 6:36
Mike Dimmick17-Jun-08 6:36 
AnswerRe: convert Pin
Niraj_Silver26-Jun-08 0:53
Niraj_Silver26-Jun-08 0:53 
QuestionSQL Injection - String replace best practice Pin
RCoate16-Jun-08 20:51
RCoate16-Jun-08 20:51 
AnswerRe: SQL Injection - String replace best practice Pin
Colin Angus Mackay16-Jun-08 21:43
Colin Angus Mackay16-Jun-08 21:43 
GeneralRe: SQL Injection - String replace best practice Pin
RCoate17-Jun-08 15:59
RCoate17-Jun-08 15:59 
GeneralRe: SQL Injection - String replace best practice Pin
Colin Angus Mackay18-Jun-08 23:13
Colin Angus Mackay18-Jun-08 23:13 
QuestionMonth and Year Pin
trilokharry16-Jun-08 19:07
trilokharry16-Jun-08 19:07 
AnswerRe: Month and Year Pin
Alsvha16-Jun-08 19:54
Alsvha16-Jun-08 19:54 
GeneralRe: Month and Year Pin
trilokharry16-Jun-08 20:41
trilokharry16-Jun-08 20:41 

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.