RE: Select with join query question

2003-07-29 Thread Richard Bolen
-Original Message- From: Bruce Feist [mailto:[EMAIL PROTECTED] Sent: Monday, July 28, 2003 7:42 PM To: Richard Bolen Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Select with join query question Richard Bolen wrote: >This works! I was then wondering how to get the total numbe

RE: Re: Select with join query question

2003-07-28 Thread Richard Bolen
This works! I was then wondering how to get the total number of all jobs that this condition is true for? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, July 28, 2003 5:26 PM To: Bruce Feist Cc: Richard Bolen; [EMAIL PROTECTED] Subject: Re: Re

RE: Select with join query question

2003-07-28 Thread Richard Bolen
y fields joined from Submissions that don't have a match in Jobs. Just include at least on field from Submissions and test for null on that field. SELECT *,s.status AS ActiveJob FROM Jobs AS j LEFT JOIN Submissions AS s ON j.job_id=s.job_id WHERE s.status IS NULL On Monday, July 28, 2003, at 02:3

Select with join query question

2003-07-28 Thread Richard Bolen
I'm trying to write a select query that involves 2 tables. One table (Submissions) has a one to many relationship with the other table (Jobs). I'm trying to find all the records in Jobs that do NOT have a corresponding record in Submissions with a status of 1. The problem I'm having is that when

RE: Complex SQL query problem...

2002-09-23 Thread Richard Bolen
NULL) or (colors.parent_id is not NULL)) I need to do some more testing to be sure. Rich -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED]] Sent: Monday, September 23, 2002 08:46 To: Richard Bolen Subject: RE: Complex SQL query problem... After I sent this it hit me

RE: Complex SQL query problem...

2002-09-20 Thread Richard Bolen
(E-mail) Subject: RE: Complex SQL query problem... try a left join select count(*) from jobs left join submissions on jobs.standard_id=submissions.color_id where jobs.standard_id=ID_VALUE and submissions.color_id is null Eddie -Original Message- From: Richard

Complex SQL query problem...

2002-09-20 Thread Richard Bolen
I'm trying to use a sql query to determine if an ID exists in any of 3 different tables in the database. I need to do this in one SQL query (ideally only using the ID once in the query). I'm using mysql 3.23.47. Here's an example of a query I came up with: select count(*) from jobs, submissi

Forcing case sensitivity via a query?

2002-05-22 Thread Richard Bolen
If I understand correctly, you have to define a char field as binary if you want the database to treat it as a 'case sensitive' field. Is there any way via a SQL query to force case sensitivity to be used for a non-binary char field? i.e.: for comparing strings in a case sensitive way. Or is

MySQL subtracting an hour from DATETIME types I insert?

2002-04-16 Thread Richard Bolen
I have a java application accessing MySQL via the mm.mysql type 4 jdbc driver. It appears that when I insert a record with a DATETIME type in it, it's subtracting an hour from the time. Does anyone know why this might be happening? Is it a timezone or daylight savings time issue? My server

RE: LOAD DATA INFILE and how to ignore garbage lines at end ofload file?

2002-03-04 Thread Richard Bolen
I added the line "set feedback off" at the beginning of my Oracle report script and that suppressed the output of the garbage lines. -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 11:33 AM To: Richard Bolen; MySQL Mailing Li

LOAD DATA INFILE and how to ignore garbage lines at end of load file?

2002-03-04 Thread Richard Bolen
I'm exporting data from Oracle and importing it into MySQL. The problem is Oracle puts garbage lines at the end of it's output files. Lines like "300 rows selected" and "input truncated to 9 chars" as well as empty lines. When MySQL loads these files, I'm getting rows inserted for the empty

Emulating a sequence in MySQL?

2002-03-01 Thread Richard Bolen
I need to have unique id's for every data element in my system no matter which table it's in. In Oracle I can create a sequence and with one SQL query I can increment the value and retrieve it for use in my next insert. Can I do this in MySQL? I know about AUTO INCREMENT but that appears to

RE: AUTO_INCREMENT columns randomly restart counting from 1

2002-01-30 Thread Richard Bolen
I think AUTO_INCREMENT is on a per-connection basis. So if you're doing this across different database connections, it will reset to 0. Rich Hi there We have some table used as sequences. They only have 2 columns (ID, PID), with the AUTO_INCREMENT flag set for one of them (ID). By default

RE: MySQL JDBC setup in weblogic.

2002-01-28 Thread Richard Bolen
This config worked for me: weblogic.jdbc.connectionPool.PoolName=\ url=jdbc:mysql://localhost:3306/test,\ driver=org.gjt.mm.mysql.Driver,\ initialCapacity=1,\ maxCapacity=10,\ capacityIncrement=1,\ props=user=DBUser;password=DBPassword weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.PoolName=

Equivalent of an Oracle SEQUENCE in mysql?

2002-01-25 Thread Richard Bolen
Is there the equivalent of a sequence in mysql? Does anyone have an example of emulating sequences? Thanks Rich Rich Bolen Senior Software Developer GretagMacbeth Advanced Technologies Center 79 T. W. Alexander Drive - Bldg. 4