Re: Help on sql statement (not MySQL specifik)

2006-03-05 Thread Rhino
time of events 2) etype is nominal, not inteval data so You can't use < or > operator - Original Message - From: "Rhino" <[EMAIL PROTECTED]> To: "Michael Stassen" <[EMAIL PROTECTED]> Cc: "Søren Merser" <[EMAIL PROTECTED]>; Sent:

Re: Help on sql statement (not MySQL specifik)

2006-03-05 Thread Søren Merser
[EMAIL PROTECTED]> To: "Michael Stassen" <[EMAIL PROTECTED]> Cc: "Søren Merser" <[EMAIL PROTECTED]>; Sent: Sunday, March 05, 2006 9:05 PM Subject: Re: Help on sql statement (not MySQL specifik) You're absolutely right that I'd need some good luck for thi

Re: Help on sql statement (not MySQL specifik)

2006-03-05 Thread Rhino
probably be a lot easier if the data was clean to start with. In any case, thanks for keeping me honest. -- Rhino - Original Message - From: "Michael Stassen" <[EMAIL PROTECTED]> To: "Rhino" <[EMAIL PROTECTED]> Cc: "Søren Merser" <[EMAIL

Re: Help on sql statement (not MySQL specifik)

2006-03-05 Thread Michael Stassen
Rhino wrote: I don't really understand _why_ you want to do this but here is a query that gives the result you want: select id, case type when 4 then 4 else null end as type from Soren01 group by id; The GROUP BY ensures that you get one row for each value of id; the case expression in the Se

Re: Help on sql statement (not MySQL specifik)

2006-03-05 Thread Rhino
le will try to help you. -- Rhino - Original Message - From: "Michael Stassen" <[EMAIL PROTECTED]> To: "Søren Merser" <[EMAIL PROTECTED]> Cc: Sent: Sunday, March 05, 2006 1:13 PM Subject: Re: Help on sql statement (not MySQL specifik) Søren Merser wrote:

Re: Help on sql statement (not MySQL specifik)

2006-03-05 Thread Rhino
says that if the value of the type is 4, leave it alone, otherwise display null. -- Rhino - Original Message - From: "Søren Merser" <[EMAIL PROTECTED]> To: ; "Rhino" <[EMAIL PROTECTED]> Sent: Sunday, March 05, 2006 11:46 AM Subject: Re: Help on sql state

Re: Help on sql statement (not MySQL specifik)

2006-03-05 Thread Michael Stassen
Søren Merser wrote: Hi, I'll try I need one record for each id in the tabel, i.e. NO duplicate id's with TYPE set to 4 or NULL Now, the TYPE of id 2 is 4 so I peserve it; As id 2 has more than one entry I have to delete it/them Id's with TYPE = NULL (id 1,4,5)is kept Id 5 (and 6) has two rec

Re: Help on sql statement (not MySQL specifik)

2006-03-05 Thread Søren Merser
Hi, I'll try I need one record for each id in the tabel, i.e. NO duplicate id's with TYPE set to 4 or NULL Now, the TYPE of id 2 is 4 so I peserve it; As id 2 has more than one entry I have to delete it/them Id's with TYPE = NULL (id 1,4,5)is kept Id 5 (and 6) has two records, none of which h

Re: Help on sql statement (not MySQL specifik)

2006-03-05 Thread Ronald J. Yacketta
I think he wants to update rows where != 4 to null that is, update TYPE setting TYPE to null where TYPE != 4 -Ron Rhino wrote: - Original Message - From: "Søren Merser" <[EMAIL PROTECTED]> To: Sent: Sunday, March 05, 2006 9:12 AM Subject: Help on sql statement (no

Re: Help on sql statement (not MySQL specifik)

2006-03-05 Thread Rhino
- Original Message - From: "Søren Merser" <[EMAIL PROTECTED]> To: Sent: Sunday, March 05, 2006 9:12 AM Subject: Help on sql statement (not MySQL specifik) Hi Could someone please help me out here? TABLE: RECNO| ID |TYPE ---

Help on sql statement (not MySQL specifik)

2006-03-05 Thread Søren Merser
Hi Could someone please help me out here? TABLE: RECNO| ID |TYPE - 1| 1|NULL 2| 2|4<-KEEP AS IS 3| 2|6<- DROP 4| 3

RE: Help on SQL Statement

2001-10-31 Thread Rick Emery
embedded joins -Original Message- From: Mike Mike [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 31, 2001 11:24 AM To: [EMAIL PROTECTED] Subject: Help on SQL Statement Hello, I've been working on this for a long time now and I cannot figure this out. Can someone help me get thi

Help on SQL Statement

2001-10-31 Thread Christopher Book
You can't use brackets on left joins like that. If you want to do two left joins, you use: LEFT JOIN table1 ON conds LEFT JOIN table2 ON conds That's why you're getting the error that mysql displayed, it doesn't expect a bracket. Chris >>>SELECT DISTINCT ItemMaster.ParentNum, ItemMaster

Help on SQL Statement

2001-10-31 Thread Mike Mike
Hello, I've been working on this for a long time now and I cannot figure this out. Can someone help me get this sql statement without erroring or why it doens't work. Here is the SQL statement... SELECT DISTINCT ItemMaster.ParentNum, ItemMaster.Desc1, ItemMaster.Price FROM BillOfMat AS BillOfMat