[ cf-dev ] More SQL Q's...

2002-09-12 Thread Tim Blair
Well, just the one for now anyway... I have a list of services, clients and employees. Each client is linked to a number of services (via a link table, in which the client and service IDs are specified, along with a cost to that client). The same is true for an employee. I want to SELECT a

Re: [ cf-dev ] More SQL Q's...

2002-09-12 Thread Damian Watson
Can't you just shove an if in there along the lines of, if data exists for client and employer, select only client? - Original Message - From: Tim Blair [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 12, 2002 2:56 PM Subject: [ cf-dev ] More SQL Q's... Well, just

RE: [ cf-dev ] More SQL Q's...

2002-09-12 Thread Russ 'Snake' Michaels
: Tim Blair [mailto:[EMAIL PROTECTED]] Sent: 12 September 2002 14:57 To: [EMAIL PROTECTED] Subject: [ cf-dev ] More SQL Q's... Well, just the one for now anyway... I have a list of services, clients and employees. Each client is linked to a number of services (via a link table, in which the client

RE: [ cf-dev ] More SQL Q's...

2002-09-12 Thread duncan . cumming
@snakepcc: it.net Subject: RE: [ cf-dev ] More SQL Q's

RE: [ cf-dev ] More SQL Q's...

2002-09-12 Thread Tim Blair
well the easiest way is just to grab both prices and give one an alias, then you have access to both of them in your code. Sorted in some fashion. Grabbing the client service info and doing a left join on the employee one so if there's an employee cost it gets returned, otherwise NULL, so I

RE: [ cf-dev ] More SQL Q's...

2002-09-12 Thread Russ 'Snake' Michaels
ok then slap an IF statement in the query and pull out the appropriate column. -Original Message- From: Tim Blair [mailto:[EMAIL PROTECTED]] Sent: 12 September 2002 15:45 To: [EMAIL PROTECTED] Subject: RE: [ cf-dev ] More SQL Q's... *poster fist* But now I'm just trying