RE: Simple SQL Query?

2001-07-17 Thread Kent Hoover
Read all about Join in the manual -- it includes hints like this query: SELECT DISTINCT(PersonID) FROM PersonProject AS P1 LEFT JOIN PersonProject AS P2 ON P2.PersonID=P1.PersonID AND P2.ProjectID=2 WHERE P2.PersonID IS NULL; Cheers, Kent

RE: Simple SQL Query?

2001-07-17 Thread Glenn Wearen
That is exactly what I want, Thanks Rafal PS: does anybody know if there are plans to support nested queries in mySQL? Hi, maybe something like this: select a.PersonId from PersonProject a left join PersonProject b on(a.PersonID=b.PersonID and b.ProjectID=2) where b.PersonID is null group

Re: SQL query problem

2001-06-25 Thread Adrian D'Costa
On Fri, 22 Jun 2001, Thomas J Keller wrote: select zip, city, county from zipcodes where zip between 68400 and 68500; here is a portion of the garbled output: |68442 | STELLA | RICHARDSON |43 | STERLING | JOHNSON |444 | STRANG | FILLMORE |5 |

my sql query retrieval(Urgent)

2001-06-22 Thread VVM Ravikumar Sarma Chengalvala
Hi, Is there a way to retrieve the field values in the same order as during insertions based on something like rowid or so?? Eg: Insertion order into a table for a text field: bbb abaa aa Retrieval order: I want to have the retrieval order also the same.The output of the query on

RE: my sql query retrieval(Urgent)

2001-06-22 Thread Don Read
On 22-Jun-01 VVM Ravikumar Sarma Chengalvala wrote: Hi, Is there a way to retrieve the field values in the same order as during insertions based on something like rowid or so?? Eg: Insertion order into a table for a text field: bbb abaa aa Retrieval order: I want to

Re: my sql query retrieval(Urgent)

2001-06-22 Thread Benjamin Pflugmann
Hi. On Fri, Jun 22, 2001 at 05:31:32PM +0100, [EMAIL PROTECTED] wrote: Hi, Is there a way to retrieve the field values in the same order as during insertions based on something like rowid or so?? No. Insertion order is not kept anywhere. Use an AUTO_INCREMENT column to obtain an key to

SQL query problem

2001-06-22 Thread Thomas J Keller
I am using two versions of MySQL, on two different platforms, and having the same problem on both. One very odd aspect of this problem is that it behaves precisely the same way on both platforms, down to which records are garbled onscreen and how they are garbled. Anyone with any ideas?

Re: SQL query - not too complex?

2001-06-18 Thread Benjamin Pflugmann
Hi. On Mon, Jun 18, 2001 at 02:32:13AM +0100, [EMAIL PROTECTED] wrote: I need some help with a query to sum data for each id and write it into a new table. I have a source data table for each calendar month containing i.d.'s (not unique) and a value and I need to sum all the values for

SQL query - not too complex?

2001-06-17 Thread mysql-lists
I need some help with a query to sum data for each id and write it into a new table. I have a source data table for each calendar month containing i.d.'s (not unique) and a value and I need to sum all the values for each i.d. for all months into a new table (where each i.d. will now be unique).

Re: SQL query - not too complex?

2001-06-17 Thread Paul DuBois
At 2:32 AM +0100 6/18/01, [EMAIL PROTECTED] wrote: I need some help with a query to sum data for each id and write it into a new table. I have a source data table for each calendar month containing i.d.'s (not unique) and a value and I need to sum all the values for each i.d. for all months into

What is the error in this sql query

2001-06-05 Thread Syed sumair
What is the error in this sql query ??? _ CREATE TABLE page( page_ID INT (9) UNSIGNED DEFAULT '0' NOT NULL AUTO_INCREMENT, relative_path VARCHAR (200) Not NULL, keywords VARCHAR (200) , have_vote ENUM (3), PRIMARY KEY(page_ID), UNIQUE(page_ID), INDEX

Re: What is the error in this sql query

2001-06-05 Thread Ansgar Becker
have_vote ENUM (3), must be this: have_vote ENUM ('3'), Greetings, Ansgar What is the error in this sql query ??? _ CREATE TABLE page( page_ID INT (9) UNSIGNED DEFAULT '0' NOT NULL AUTO_INCREMENT, relative_path VARCHAR (200) Not NULL, keywords

RE: What is the error in this sql query

2001-06-05 Thread David Lidstrom ( Cabesa )
Subject: What is the error in this sql query What is the error in this sql query ??? _ CREATE TABLE page( page_ID INT (9) UNSIGNED DEFAULT '0' NOT NULL AUTO_INCREMENT, relative_path VARCHAR (200) Not NULL, keywords VARCHAR (200) , have_vote ENUM (3), PRIMARY

Re: What is the error in this sql query

2001-06-05 Thread Rolf Hopkins
I would say line 2, DEFAULT 0 not DEFAULT '0'. - Original Message - From: Syed sumair [EMAIL PROTECTED] To: MySQL List [EMAIL PROTECTED] Sent: Friday, June 01, 2001 7:11 Subject: What is the error in this sql query What is the error in this sql query

what is the sql query ?

2001-06-04 Thread Harsh
| ++-+ PS : The agent no 25 has not come because he does not hv any association with deptid 19. Can anybody pls give me the SQL query to generate the above resultset ? Regards Harsh http://mail.indiainfo.com First you had 10MB of free mail space. Now you can

RE: what is the sql query ?

2001-06-04 Thread Don Read
| | 1 | 27 | ++-+ PS : The agent no 25 has not come because he does not hv any association with deptid 19. Can anybody pls give me the SQL query to generate the above resultset ? SELECT count(b.dept) as cnt,a.agent as agent FROM tbl as a LEFT JOIN tbl as b

EXPLAIN on SQL Query

2001-05-24 Thread Samantha Savvakis
Hi, System Specs: SCO Openserver 5.0.6 MySQL 3.23.38 I have the following SQL Query (don't worry about the table aliasing) SELECT vdm1.model, vdm1.version, vdm1.date_ls_ro, zdna1.code, zdna1.name, zdna1.title, zdna1.phone_bus, zdna1.phone_home, zdna1.pstl_adr_1, zdna1

Q: SQL query problems

2001-05-22 Thread Wemmer Alexander
Hello, I have a problem composing a sql-statement for my special needs. I hope anybody can help me. This is the situation: I have 2 tables, a and b as following: -- | a | -- | eid | name | -- -- | b|

in SQL query can we use sysdate to get System date

2001-05-10 Thread AVDHUT SHEDGE
in SQL query can we use sysdate to get System date like Oracle _ Chat with your friends as soon as they come online. Get Rediff Bol at http://bol.rediff.com - Before

Re: in SQL query can we use sysdate to get System date

2001-05-10 Thread Peter Pentchev
On Thu, May 10, 2001 at 10:24:11AM -, AVDHUT SHEDGE wrote: in SQL query can we use sysdate to get System date like Oracle What's wrong with NOW(), as seen in the manual? Reference Functions Date and Time Functions Next time, take a look there :) G'luck, Peter -- yields falsehood, when

RE: in SQL query can we use sysdate to get System date

2001-05-10 Thread Don Read
On 10-May-01 AVDHUT SHEDGE wrote: in SQL query can we use sysdate to get System date like Oracle mysql select SYSDATE(); +-+ | SYSDATE() | +-+ | 2001-05-10 05:46:28 | +-+ Does Orkcle have manuals ? Regards, -- Don Read

Regarding SQL query with Unique

2001-05-08 Thread AVDHUT SHEDGE
We want to get the Unique value from a table. can we use the following query: select unique(ProblemNo) from MainProblem; where MainProblem is a Table having Column ProblemNo. the contents of ProblemNo are 1 1 2 2 3 3 3 the result of the above query must be : 1 2 3 Thank You.

Re: Regarding SQL query with Unique

2001-05-08 Thread Welcome
use distinct() instead. - Original Message - From: AVDHUT SHEDGE [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 08, 2001 3:00 PM Subject: Regarding SQL query with Unique We want to get the Unique value from a table. can we use the following query: select unique

Re: Regarding SQL query with Unique

2001-05-08 Thread Joseph Bueno
AVDHUT SHEDGE wrote: We want to get the Unique value from a table. can we use the following query: select unique(ProblemNo) from MainProblem; where MainProblem is a Table having Column ProblemNo. the contents of ProblemNo are 1 1 2 2 3 3 3 the result of the above query must

Tricky SQL query

2001-04-23 Thread Andrei Zmievski
Hi, I have a table that keeps track of when certain articles go up on the site. It has a field called featureStart, which is a unix timestamp. The features stay on the site until the next feature replaces them, so there is no featureEnd. If one feature started on Apr 23 and another one is

Help with complex SQL Query

2001-04-12 Thread Peter M. Perchansky
Greetings: Prelude: We have five tables all sharing a very similar structure (each has a Customer_ID and Server_ID field for example). Each table can contain zero to many records with duplicate Server_ID values allowed. Need: I need to be able to count the distinct Server_ID's across all of

SQL query question?

2001-04-05 Thread roger westin
Hi there, So a question I have two tables. And i want to... (i just show you) Table 1. OwnerChar(30)Uniqe FileChar(80) OIDint(not in use yet) Table 2. IDintuniqe and so on OwnerChar NameChar adress

Re: SQL query question?

2001-04-05 Thread Steve Werby
It's not possible to do in one step in MySQL. -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/ "roger westin" [EMAIL PROTECTED] wrote: So a question I have two tables. And i want to... (i just show you) Table 1. OwnerChar(30)Uniqe File

Complex SQL Query

2001-03-28 Thread Alberni-dot-Net
I have been trying for the last while to come up with a query that will do the following: Say I have table with these records: StartDate StopDate --- 2001-01-23 23:43:12 2001-01-24 04:29:12 2001-01-24 15:24:00 2001-01-26

RE: Complex SQL Query

2001-03-28 Thread Alberni-dot-Net
: Wednesday, March 28, 2001 15:53 To: Alberni-dot-Net Cc: [EMAIL PROTECTED] Subject: RE: Complex SQL Query Aaron, Are you inserting both values at once? Or inserting the startdate first, then updating the stopdate later. You may or may not be able to do this in one query. To determine how much time

SQL query

2001-03-15 Thread Pawan Kanda
Hi , i have the following method: public Object getValueAt(int row, int column){ // in here i want to construct a SQL query which gives the object at a certain row and column } Do you know how to do it? Thanks Pawan

Re: SQL query

2001-03-15 Thread Steve Ruby
Pawan Kanda wrote: Hi , i have the following method: public Object getValueAt(int row, int column){ // in here i want to construct a SQL query which gives the object at a certain row and column } Do you know how to do it? Thanks Pawan Maybe make your sql statement read sql

SQL query problem with mysql.

2001-03-05 Thread Larry Kim
hi, i'm writing a book (wrox publishers) which uses mysql for the sample database. i seem to have encountered a problem with an SQL query. its a simple voting application, with a candidate table, and a vote table: create table candidate ( candidatenumber integer not null auto_increment

RE: SQL query problem with mysql.

2001-03-05 Thread Aaron Weiker
PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: SQL query problem with mysql. hi, i'm writing a book (wrox publishers) which uses mysql for the sample database. i seem to have encountered a problem with an SQL query. its a simple voting application, with a candidate table, and a vote table

Re: SQL query problem with mysql.

2001-03-05 Thread Jason Landry
Cc: [EMAIL PROTECTED] Sent: Monday, March 05, 2001 3:54 AM Subject: SQL query problem with mysql. hi, i'm writing a book (wrox publishers) which uses mysql for the sample database. i seem to have encountered a problem with an SQL query. its a simple voting application, with a candidate table,

Re: SQL query problem with mysql.

2001-03-05 Thread Bob Hall
hi, i'm writing a book (wrox publishers) which uses mysql for the sample database. i seem to have encountered a problem with an SQL query. its a simple voting application, with a candidate table, and a vote table: create table candidate ( candidatenumber integer not null auto_increment

SQL query problem

2001-01-23 Thread Sander Pilon
Okay, here's one for the guru's out there :) I have a list of entries with unique id numbers X, and a set of sort methods (S1 ... Sy). Now, if I want to get an entry at position P (0...z) in the list of entries ordered by method S1 then I'd make the following query: SELECT X FROM table WHERE

Re: SQL query problem

2001-01-23 Thread Peter Pentchev
On Tue, Jan 23, 2001 at 05:39:47PM +0100, Sander Pilon wrote: Okay, here's one for the guru's out there :) I have a list of entries with unique id numbers X, and a set of sort methods (S1 ... Sy). Now, if I want to get an entry at position P (0...z) in the list of entries ordered by

<    1   2   3   4   5