Re: Help with CREATE SELECT Statement

2004-02-11 Thread Roger Baklund
* Carlos Vazquez > I get this error when I try to execute the following select statement: > "All Parts of a PRIMARY KEY must be NOT NULL; if you need null in > a key, use UNIQUE instead." > > CREATE TEMPORARY TABLE IF NOT EXISTS > CashVariances > (PRIMARY KEY(sUnit)) > SELECT > sUnit,

Re: Help with AES_DECRYPT

2004-02-09 Thread Jigal van Hemert
$query = "SELECT date, AES_DECRYPT('cardnumber1','jmbjd'), AES_DECRYPT('cardnumber2','jmbjd'), AES_DECRYPT('cardnumber3','jmbjd'), AES_DECRYPT('cardnumber4','jmbjd'), upload_type, z_errors, a_errors, db_errors FROM customers WHERE refrence_number = '$refnum'"; If 'cardnumber1' is the name of the c

Re: Help with query

2004-02-06 Thread David Hodgkinson
On 6 Feb 2004, at 14:38, Erich Beyrent wrote: This seems really efficient, since the only large number of rows to search against is the main listings table, if I read this right. Is there any further optimization that I can do, or this as good as it gets? Believe me, I am NOT complaining!!! Yes,

RE: Help with query

2004-02-06 Thread Erich Beyrent
the WHERE clause, right? > > Thanks! > > -Erich- > > > -Original Message- > From: Schwartz, Evelyn [mailto:[EMAIL PROTECTED] > Sent: Friday, February 06, 2004 8:53 AM > To: [EMAIL PROTECTED]; [EMAIL PROT

RE: Help with query

2004-02-06 Thread Schwartz, Evelyn
From: Erich Beyrent [mailto:[EMAIL PROTECTED] Sent: Fri 2/6/2004 9:00 AM To: [EMAIL PROTECTED] Cc: Subject: RE: Help with query Hi Evelyn, How would I do that - would something like this be what you had in mind?

RE: Help with query

2004-02-06 Thread Erich Beyrent
, February 06, 2004 8:53 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Help with query You will need parentheses around the 'or' clauses of your where clause. You also don't seem to join the categories table with any other tables. If you don't join tables you

RE: Help with query

2004-02-06 Thread Schwartz, Evelyn
You will need parentheses around the 'or' clauses of your where clause. You also don't seem to join the categories table with any other tables. If you don't join tables you will create what is called a 'cross product' query. If table A has 10 rows and table B has 20 rows then querying A and

Re: HELP! Select queries for tables that has fields with # characters

2004-01-29 Thread Bernard Clement
-Original Message- > From: Bernard Clement [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 29, 2004 1:19 PM > To: Howell, Scott; Mysql (E-mail) > Subject: Re: HELP! Select queries for tables that has fields with # > characters > > > Hello Howell, > > See URL: http

RE: HELP! Select queries for tables that has fields with # characters

2004-01-29 Thread Howell, Scott
select * from emp where `file#` = 1332; returns ERROR 1054: Unknown column 'file' in 'where clause' -Original Message- From: Bernard Clement [mailto:[EMAIL PROTECTED] Sent: Thursday, January 29, 2004 1:19 PM To: Howell, Scott; Mysql (E-mail) Subject: Re: HELP! Selec

Re: HELP! Select queries for tables that has fields with # characters

2004-01-29 Thread Bernard Clement
Hello Howell, See URL: http://www.mysql.com/doc/en/Legal_names.html for the solution. Basically enclose FILE# with `, e.g. where `FILE#` = 1332 Bernard On Thursday 29 January 2004 12:55, Howell, Scott wrote: > I am trying to query a table that has field names with # characters in > them. For ex

RE: HELP! Select queries for tables that has fields with # characters

2004-01-29 Thread Mike Johnson
From: Howell, Scott [mailto:[EMAIL PROTECTED] > I am trying to query a table that has field names with # > characters in them. > For example a table emp_earn has a field called FILE# > > I need to do a query where FILE# = 1332, but anything I try > errors out. I can't seem to even create a

Re: Help w/ a Query

2004-01-21 Thread Roger Baklund
* jalil > I need to get total number of all rows in a table and also select some > rows from the same table. I know how to do this > using two queries, but was wondering if there is any way to do it in one > query (one trip to the database). >From version 4 you can use the SQL_CALC_FOUND_ROWS opti

Re: help about mysql_real_connect!

2004-01-08 Thread Arunachalam
Hi Li, If you want to see the implementation portion of C coding for mysql_real_connect, U can see open the mysql.h header file in any C++ editor. I don't know Why do you want to see those iplementation? libmysql.lib is a library file used to permit dynamic calls from it's clients. libmysqld.lib

Re: Help with Query

2004-01-06 Thread robert_rowe
Try single quotes around instead of double quotes. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Help with Query

2004-01-06 Thread Michael Stassen
Jay Blanchard wrote: [snip] $query = "SELECT empnum,name,hdate,Photo,(YEAR(Curdate()) - YEAR(hdate)) as timein FROM emp2 where mo nth(hdate)=$mymonth and empnum < "" order by timein"; [/snip] Change to single quotes around data $query = "SELECT empnum,name,hdate,Photo,(YEAR(Curdate()) - YEA

RE: Help with Query

2004-01-06 Thread Jay Blanchard
[snip] $query = "SELECT empnum,name,hdate,Photo,(YEAR(Curdate()) - YEAR(hdate)) as timein FROM emp2 where mo nth(hdate)=$mymonth and empnum < "" order by timein"; [/snip] Change to single quotes around data $query = "SELECT empnum,name,hdate,Photo,(YEAR(Curdate()) - YEAR(hdate)) as timein FR

Re: Help:)

2004-01-04 Thread Michael Stassen
: Don Matlock [mailto:[EMAIL PROTECTED] Sent: Sunday, January 04, 2004 11:32 AM To: [EMAIL PROTECTED] Subject: RE: Help:) Thank you very much for the prompt reply. Yes you were correct, it was the fact that the password had not been entered at all...I did the mysql -u root -p when prompted for the

Re: Help:)

2004-01-04 Thread Bruce Ferrell
pe in the command for the pass wrong? Don -Original Message- From: Michael Stassen [mailto:[EMAIL PROTECTED] Sent: Sunday, January 04, 2004 2:40 AM To: robert_rowe Cc: [EMAIL PROTECTED]; Don Matlock Subject: Re: Help:) robert_rowe wrote: Issuing this command: mysql>SET PASSWORD

RE: Help:)

2004-01-04 Thread Larry Brown
try... update user set password=PASSWORD('xx') where user='root' and host='localhost'; (replacing the x's with the password) Larry -Original Message- From: Don Matlock [mailto:[EMAIL PROTECTED] Sent: Sunday, January 04, 2004 11:32 AM To:

RE: Help:)

2004-01-04 Thread Don Matlock
sage- From: Michael Stassen [mailto:[EMAIL PROTECTED] Sent: Sunday, January 04, 2004 2:40 AM To: robert_rowe Cc: [EMAIL PROTECTED]; Don Matlock Subject: Re: Help:) robert_rowe wrote: > Issuing this command: > > >>mysql>SET PASSWORD FOR 'root'@'localhost'

Re: Help:)

2004-01-04 Thread Michael Stassen
robert_rowe wrote: Issuing this command: mysql>SET PASSWORD FOR 'root'@'localhost' = PASSWORD xx set your password to xx I'm not so sure. PASSWORD is a function which expects a string. The correct syntax is SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new_password') so I

Re: Help:)

2004-01-03 Thread robert_rowe
Issuing this command: > mysql>SET PASSWORD FOR 'root'@'localhost' = PASSWORD xx set your password to xx You will need to use mysql -u root -p xx from the local machine to get access with the root user. This: mysql -u root -p is specifying a blank password. I beli

Re: Help on Select/Join

2003-12-30 Thread Bjoern Wuest
Dear all, thank you very much for the fast and numerous responses. The idea of Roger Baklund does exactly what I want. Thank you very much Roger. I oversee the possibility to use IF conditions on MySQL server, this is what I wanted to do programmatically but to do in the DB server is ok. Let's s

Re: Help on Select/Join

2003-12-30 Thread Bob Terrell
on 12/29/03 12:00 PM, Bjoern Wuest wrote: > Hello > > I have the following problem: > > Table1 'pl': > +---+---+ > | p | o | > +---+---+ > > Table2 'ln': > +---+--+---+ > | p | l | v | > +---+--+---+ > > Now my problem: how to write a statement to select all 'p' and 'v' from 'pl' >

Re: Help with Update statement

2003-12-29 Thread Abs
--- rmck <[EMAIL PROTECTED]> wrote: > mysql> SELECT start,ID FROM table ORDER BY id DESC > LIMIT 1; > > ++---+ > | start | ID| > ++---+ > | 10726035

Re: Help on Select/Join

2003-12-29 Thread Roger Baklund
* Bjoern Wuest > I work on this problem for three days now and could not find any > tip in any manual, book, tutorial or search engine. > > I have the following problem: > > Table1 'pl': > +---+---+ > | p | o | > +---+---+ > | 1 | 1 | > | 2 | 1 | > | 3 | 2 | > +---+---+ > > Table2 'ln': > +---

RE: Help me - please

2003-12-19 Thread Carlos André Moura de Amorim
> > -Message d'origine- > De : Carlos André Moura de Amorim [mailto:[EMAIL PROTECTED] > Envoyé : vendredi 19 décembre 2003 14:55 > À : Chris Elsworth > Cc : [EMAIL PROTECTED] > Objet : Re: Help me - please > > > > i added ulimit -n 1024 in mysql_insta

Re: Help me - please

2003-12-19 Thread Victor Medina
what distro are you using? what is running on this server? another server is runnin' on the same machine? what hardware are you using? is it heavy loaded? On Fri, 2003-12-19 at 09:54, Carlos Andrà Moura de Amorim wrote: > i added ulimit -n 1024 in mysql_install_db, i can't to install. Appear th

RE: Help me - please

2003-12-19 Thread Mechain Marc
You must be 'root' to do a "ulimit -n 1024". Marc. -Message d'origine- De : Carlos André Moura de Amorim [mailto:[EMAIL PROTECTED] Envoyé : vendredi 19 décembre 2003 14:55 À : Chris Elsworth Cc : [EMAIL PROTECTED] Objet : Re: Help me - please i added ulimit -n

Re: Help me - please

2003-12-19 Thread Carlos André Moura de Amorim
i added ulimit -n 1024 in mysql_install_db, i can't to install. Appear the error again. Please again!!! On Thu, 18 Dec 2003, Chris Elsworth wrote: > On Thu, Dec 18, 2003 at 05:28:30PM -0200, Carlos Andr? Moura de Amorim wrote: > > > 031217 14:32:34 Warning: setrlimit couldn't increase number o

Re: help me!!!how to write such sql in mysql?

2003-12-19 Thread Egor Egorov
"xian ting" <[EMAIL PROTECTED]> wrote: > in sql: insert into table select from ... > can select from a remote data base server such as sqlserver using odbc > as 'SELECT * into test01 FROM Fund IN [ODBC] [ODBC;Driver=SQL > Server;UID=admin;PWD=;Server=(lacal);DataBase=CMBXMDM;]'in access. > thanks

Re: Help me - please

2003-12-18 Thread Chris Elsworth
On Thu, Dec 18, 2003 at 05:28:30PM -0200, Carlos Andr? Moura de Amorim wrote: > 031217 14:32:34 Warning: setrlimit couldn't increase number of open files > to more than 256 (request: 510) It might be worth putting a "ulimit -n 1024" (or some other decent number) in the rc.d script that starts my

Re: HELP!

2003-11-30 Thread Stephen Fromm
- Original Message - From: "Andy (da man) Rosenblatt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, November 29, 2003 4:05 PM Subject: HELP! > hi > I bought a book with your mySQL program and seemed to have installed it worng and i cant stop it. I never set a user name or

Re: [Help-gnu-radius] mysql/radius populate db question

2003-11-28 Thread Sergey Poznyakoff
Hi Greg, > Here's my situation. I'm implementing radiusd on a solaris box using > a mysql database that's on a remote windows host. I've managed to get > a user authenticaed (still with the CLID unknown message, but I'll > move on. Hope that's OK to do.) It's OK. Moreover, since that message i

Re: help needed!

2003-11-25 Thread Martijn Tonies
Hi Dominic, > I think everyone is misunderstanding my problem as perhaps I didnt phrase it very well. > > I need to add a new autonumber field to my db, but I need to make sure when the numbers go into the field they are in the order of one of my other fields that is a date field. > > i.e. I have

Re: help needed!

2003-11-25 Thread Martijn Tonies
Hi, (please reply to the list only) > Yes thanks but how do I then add a new auto number field and still keep the order? What order? What has an auto-number have to do with what order? Please explain your problem in detail - it might be completely clear to you, but we're outsiders :-) With reg

Re: help needed!

2003-11-25 Thread Martijn Tonies
Hi, > I need to add a new auto field to my db, but I need to make sure the records are listed in order of one of the other fields first which is a date field. > > Any ideas how I do this would be greatly appreciated! "listing records" is in no particular order, unless you ask for an order. SELEC

Re: Help recovering db

2003-11-24 Thread Janusz Krzysztofik
>From MySQL Manual: "If you want to change the number or the size of your InnoDB log files, you have to shut down MySQL and make sure that it shuts down without errors. Then copy the old log files into a safe place just in case something went wrong in the shutdown and you will need them to recover

RE: help on my query statement

2003-11-10 Thread Erik Osterman
003 10:06 AM To: [EMAIL PROTECTED] Cc: Admin-Stress Subject: Re: help on my query statement * Admin-Stress > I have a table called TRANSACTION, it has some fields : > > REGDATE - date of the transaction > WHAT - a string (NOT UNIQUE) > CUSTOMER - customer code > > I want to q

Re: help on my query statement

2003-11-09 Thread Roger Baklund
* Admin-Stress > I have a table called TRANSACTION, it has some fields : > > REGDATE - date of the transaction > WHAT - a string (NOT UNIQUE) > CUSTOMER - customer code > > I want to query all WHAT that the date of the transaction was 15 > days before. > > So, my sql query is : > > SELECT WHAT FROM

RE: Help obtaining DBI binaries

2003-10-24 Thread Dathan Vance Pattishall
www.cpan.org or www.rpmfind.net comes in a package. Most perl distributions have this installed by default. - Dathan Vance Pattishall   - Sr. Programmer and mySQL DBA for FriendFinder Inc.   - http://friendfinder.com/go/p40688 -->-Original Message- -->From: Daniel [mailto:[EMAIL PRO

Re: Help needed

2003-10-19 Thread Roger Baklund
* Unnar > I have a problem with this query > > Version MySQL 4.0.15-nt > > The query gets all articles written by author but excludes those articles > which are related to products > > SELECT DISTINCT > post.post_id, > post.title > FROM > c_posts post, > c_post_produ

RE: Help in querying

2003-10-17 Thread Rob
SELECT * FROM WHERE value > 915 -Original Message- From: delz [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 9:46 AM To: [EMAIL PROTECTED] Subject: Help in querying Hi All, I'm using mysql as my database. I have a table which has the following colums: idx productname value

Re: Help with a DATETIME Query PLEASE!

2003-10-10 Thread Rory McKinley
Shaun Not a 100 % sure if this is what you're looking for or if somebody's already suggested it also do not know how practical it is for your application If a booking spans more than one day (e.g. two) split it into two days - and write two records to the table one for each daythis fi

RE: Help With a DATETIME Query PLEASE!

2003-10-08 Thread Dathan Vance Pattishall
I'm under the impression that your over thinking the problem. LOOK-UP the functions DATE_SUB / INTERVAL / TIME_TO_SEC / TO_DAYS and the arithmetic should be easy. - Dathan Vance Pattishall   - Sr. Programmer and mySQL DBA for FriendFinder Inc.   - http://friendfinder.com/go/p40688 -->-Or

Re: Help With a DATETIME Query PLEASE!

2003-10-08 Thread Ben Edwards
On Wed, 2003-10-08 at 09:52, shaun thornburgh wrote: > Hi, > > I have a table called Bookings which has two important columns; > Booking_Start_Date and Booking_End_Date. These columns are both of type > DATETIME. The following query calculates how many hours are available > between the hours of 09

RE: Help With a DATETIME Query

2003-10-07 Thread Christensen, Dave
s one is my .02... :-) -Original Message- From: shaun thornburgh [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 07, 2003 3:51 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Help With a DATETIME Query Thanks for your reply, but its not an option! >From: "Dan Greene&q

RE: Help With a DATETIME Query

2003-10-07 Thread shaun thornburgh
Thanks for your reply, but its not an option! From: "Dan Greene" <[EMAIL PROTECTED]> To: "shaun thornburgh" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> Subject: RE: Help With a DATETIME Query Date: Tue, 7 Oct 2003 16:41:04 -0400 I know it's not the a

RE: Help With a DATETIME Query

2003-10-07 Thread Dan Greene
I know it's not the answer you're looking for... :( but dealing with overnights has caused me so much aggravation in past apps I've written, I've tended to make the client create two (or more) 'bookings' for the covered time... don't know if it's an option for you, but it's my $0.02. > -

RE: Help With a DATETIME Query

2003-10-07 Thread Andrew Braithwaite
Hi, I would do this in the application layer something like this: $list_of_days_you_want_to_look_at = ('mon','tue','wed'..); Foreach ($day in $list_of_days_you_want_to_look_at) { use a similar query to below but geared to only look at $day instead; } You should get an output like this:

RE: Help With a DATETIME Query

2003-10-07 Thread Andrew Braithwaite
Hi, I would do this in the application layer something like this: $list_of_days_you_want_to_look_at = ('mon','tue','wed'..); Foreach ($day in $list_of_days_you_want_to_look_at) { use a similar query to below but geared to only look at $day instead; } You should get an output like this:

Re: Help with LIMIT

2003-09-19 Thread Paul DuBois
At 3:08 PM +0200 9/19/03, Daniele Tagliavini wrote: Hi, I have a question for the LIMIT clause. I have two table with relation 1:n and a query like this : SELECT tableA.id, tableB.name FROM tableA INNER JOIN tableB ON tableA.id=tableB.id WHERE something LIMIT x, 20 I want to restrict the result

Re: Help needed with MySQL C API-based client (segfault)

2003-09-18 Thread Ganbold
Here is the corrected version:) Take a look at Paul DuBois book. Don't use gets. Instead use fgets. That's safe. I didn't change your gets call:) hth, Ganbold #include #include #include #if defined(_WIN32) || defined(_WIN64) #include #endif #ifdef WIN32 #pragma comment(lib,"ws2_32") #inc

Re: HELP PLEASE the weirdest error 2013 / connection ?

2003-09-09 Thread [EMAIL PROTECTED]
Thanks Martin, No I do not have that option unfortunately. I really do suspect that it has nothing to do with mysql and that rather it is the router/IPs configuration and called them upon this, but they said all is fine. So I frankly have no clue where to go from here. thanks again for any sug

Re: Help with the "IN" operator

2003-09-06 Thread Paul DuBois
At 11:25 -0400 9/6/03, Roger Davis wrote: I am having a bit of trouble with the "IN" operator. I am thinking that it just may be my misunderstanding. Situation. I have a table (ZipCounty) that I want to pull vendors from based on zipcode. So I have a Vendor like field declared as TEXT. T

Re: Help with the "IN" operator

2003-09-06 Thread mtoth
You are misunderstanding the 'IN' operator Try and think of it this way SELECT value from table where field in (1,2,3) is the same as SELECT value from table where field = 1 or field = 2 or field = 3 So in you case SELECT Count(ID) FROM ZipCounty WHERE '528' IN (VendorLink); is SELECT Count(ID)

Re: Help with variable tuning in my.cnf

2003-09-04 Thread walt
I'd bump up these two settings. innodb_buffer_pool_size=32M innodb_additional_mem_pool_size=16M I'm not sure what the max is on innodb_buffer_pool_size, but that is where innodb caches data. The more that is in cache means less disk reads which equals speed. walt K Old wrote: > > Hello ever

Re: Help with #1111 - Invalid use of group function

2003-09-04 Thread Diana Soares
Hi! Try this: SELECT TD.project_id, P.project_manager, SUM( TD.time_hours_worked ) as hours FROM time_daily TD INNER JOIN projects P ON P.project_id = TD.time_project_id WHERE TD.time_user_id = 'xpt' HAVING hours <> '0.00' Hope this helps! On Wed, 2003-09-03 at 17:24, Cory Hicks wrote:

Re: Help with #1111 - Invalid use of group function

2003-09-04 Thread Sebastian Haag
Hi, Paul DuBois said: > At 11:24 -0500 9/3/03, Cory Hicks wrote: >>Hey folks, >> >>I am trying to run the following sql query in mysql: >> >>SELECT TD.project_id, P.project_manager >>FROM time_daily TD >>INNER JOIN projects P ON P.project_id = TD.time_project_id >>WHERE TD.time_user_id = 'xpt' AND

Re: Help with #1111 - Invalid use of group function

2003-09-03 Thread Sebastian Haag
Sorry, I think it should be GROUP BY TD.project_id, P.project_manager Cory Hicks said: > Hey folks, > > I am trying to run the following sql query in mysql: > > SELECT TD.project_id, P.project_manager > FROM time_daily TD > INNER JOIN projects P ON P.project_id = TD.time_project_id > WHERE TD.

Re: Help with #1111 - Invalid use of group function

2003-09-03 Thread Sebastian Haag
Cory, Cory Hicks said: > Hey folks, > > I am trying to run the following sql query in mysql: > > SELECT TD.project_id, P.project_manager > FROM time_daily TD > INNER JOIN projects P ON P.project_id = TD.time_project_id > WHERE TD.time_user_id = 'xpt' AND ( > SUM( TD.time_hours_worked ) <> '0.00' >

Re: Help with #1111 - Invalid use of group function

2003-09-03 Thread Paul DuBois
At 11:24 -0500 9/3/03, Cory Hicks wrote: Hey folks, I am trying to run the following sql query in mysql: SELECT TD.project_id, P.project_manager FROM time_daily TD INNER JOIN projects P ON P.project_id = TD.time_project_id WHERE TD.time_user_id = 'xpt' AND ( SUM( TD.time_hours_worked ) <> '0.00'

Re: Help Instalation

2003-09-01 Thread Victoria Reznichenko
[EMAIL PROTECTED] wrote: > > In a normal case, to install Mysql in windows we need to run setup.exe and > it's launch a wizard when we define some things like a destination > directory. > > I want to know (if somebody can help me) if it is possible to install mysql > and the wizard not be lau

Re: help installing DBI modules

2003-08-23 Thread Brian Reichert
On Sat, Aug 23, 2003 at 10:42:45AM -0400, March, Kristopher (Contractor) (DSCR) wrote: > I'm trying to install DBI perl modules on a SUN 8 box. > > I can't seem to find a make utilitity for building the components. Is it > called something else or will I have to go out and install it? Is /usr/u

Re: Help with SELECT statement for date range

2003-08-19 Thread shaag
Hi, try this: SELECT * FROM your_table WHERE StartDate > NOW() AND EndDate < NOW() > Hello, > > I am having a problem when doing a SELECT. Here is the > scenerio: > > I have a table that has an event StartDate and > EndDate, based on the current Date "NOW()" I need to > know which records are

RE: Help with SELECT statement for date range

2003-08-19 Thread Ralph Guzman
SELECT * FROM table_name WHERE EndDate < now(); Is this what you need? -Original Message- From: Rob Sirota [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 4:12 AM To: [EMAIL PROTECTED] Subject: Help with SELECT statement for date range Hello, I am having a problem when doing a

Re: Help with SELECT statement for date range

2003-08-19 Thread Antony Dovgal
On Tue, 19 Aug 2003 04:11:32 -0700 (PDT) Rob Sirota <[EMAIL PROTECTED]> wrote: > Hello, > > I am having a problem when doing a SELECT. Here is the > scenerio: > > I have a table that has an event StartDate and > EndDate, based on the current Date "NOW()" I need to > know which records are curren

Re: Help with count(*)

2003-08-14 Thread Daniel Rossi
what ever happend to a unique primary key like userID ? >>> "gord barq" <[EMAIL PROTECTED]> 08/11/03 11:15am >>> I have a table I'm using for logging purposes with a schema like: create table results ( user varchar(255) ); Where user is not a unique field and I want to find out how

Re: Help with count(*)

2003-08-14 Thread Janice Wright
select count(distinct(user)) from results; Cheers, Jan -- Janice Wright Ingenta plc [EMAIL PROTECTED] Tel: +44 (0) 01865 799114 http://www.ingentaselect.com/ Sometime recently Daniel Rossi said: > what ever happend to a unique primary key like userID ? > > >>> "gord barq" <[EMAIL PROTECTED

Re: Help with count(*)

2003-08-14 Thread Tan Shao Yi
On Mon, 11 Aug 2003, gord barq wrote: > I have a table I'm using for logging purposes with a schema like: > > create table results ( > user varchar(255) > > ); > > Where user is not a unique field and I want to find out how many unique > users there are in the table. > > I want to do

RE: Help debugging this Query?

2003-08-14 Thread Aaron Wolski
AIL PROTECTED] > Sent: August 11, 2003 2:21 PM > To: Aaron Wolski > Cc: [EMAIL PROTECTED] > Subject: Re: Help debugging this Query? > > Aaron, > It sounds like the join has duplicates on both sides. If you join a->b > where a is unique (like a primary key) then you will

Re: Help debugging this Query?

2003-08-12 Thread Andy Jackman
Aaron, It sounds like the join has duplicates on both sides. If you join a->b where a is unique (like a primary key) then you will get count(b) records (where b is the rows that match a). Or if b is unique then you will get count(a) records. However if neither a or b is unique you get count(a) * co

RE: Help with count(*)

2003-08-11 Thread Jim Smith
> > what ever happend to a unique primary key like userID ? > User is not the primary key. This is a logging table so the primary key is likely to be a timestamp of some sort. Read the question. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:htt

Re: Help with count(*)

2003-08-10 Thread mos
At 08:15 PM 8/10/2003, you wrote: I have a table I'm using for logging purposes with a schema like: create table results ( user varchar(255) ); Where user is not a unique field and I want to find out how many unique users there are in the table. I want to do something like: select co

Re: help regarding mysql

2003-08-01 Thread Nils Valentin
2003年 8月 2日 土曜日 15:11、あなたは書きました: > Hi frnd. > > I am also using mysql and facing problems regarding access to > the > db using odbc from visual basic. > > i have made a table under mysql default db and > > used ms ado to connect to the db. > > what will be the server name in such a case(that will b

Re: help to structure query without using subselects

2003-08-01 Thread Roger Baklund
* Petre Agenbag > The distinct clause will return only one occurrance of the > implicated field. > distinctrow would do the same, but for an entire row. what I am > looking for > is something like distinctset(field1,field2,field7) , is this what the > MAX-CONCAT "trick" attempts to do? Not exactly

RE: help to structure query without using subselects

2003-08-01 Thread Petre Agenbag
t to make sure that you (or anyone else interested in this thread) understands exactly what the question is ( believe me, after a while thinking of it myself, I sometimes lose the entire question completely inbetween all the "if" "and" and "or"'s flying through my

Re: help to structure query without using subselects

2003-07-31 Thread Roger Baklund
* Petre Agenbag [...] > This works: > > select distinct name, max(id) as mid from table group by name > > but it only returns the name and the highest id for such a name. > > if I try this: > > select distinct name, max(id) as mid, anything_else from table group by > name > > it returns the FIRST

RE: Help!!! Need to backup mysql using - MYSQL Second Edition?

2003-07-31 Thread Thierno Cissé
ailto:[EMAIL PROTECTED] Sent: jeudi 31 juillet 2003 15:52 To: [EMAIL PROTECTED] Subject: RE: Help!!! Need to backup mysql using - MYSQL Second Edition? Thank you once again, so the correct thing is: C:\mysql\bin\>mysqldump -u ola -p --opt --databases --complete-insert --flush-logs >

RE: Help!!! Need to backup mysql using - MYSQL Second Edition?

2003-07-31 Thread Thierno Cissé
Hi, rapid correction !! in the backup command, retrieve the word mysql placed just after --flush-logs . Thierno 6C -Original Message- From: Thierno Cissé [mailto:[EMAIL PROTECTED] Sent: jeudi 31 juillet 2003 15:40 To: 'Ola Ogunneye' Cc: [EMAIL PROTECTED] Subject: RE: Help!

RE: Help!!! Need to backup mysql using - MYSQL Second Edition?

2003-07-31 Thread Thierno Cissé
iginal Message- From: Ola Ogunneye [mailto:[EMAIL PROTECTED] Sent: jeudi 31 juillet 2003 15:15 To: [EMAIL PROTECTED] Subject: RE: Help!!! Need to backup mysql using - MYSQL Second Edition? Hi, sorry to bother you, but from what you recommended, am I typing everything just the way you typed

RE: Help!!! Need to backup mysql using - MYSQL Second Edition?

2003-07-31 Thread Thierno Cissé
hi, > Still a newbie, and running mysql on windows 2000 Advanced Server. I am trying to backup > mysql and was confused as to which command to use. I see the following options use mysqldump . If you want backup whole database(s) , proceed to next : mysqldump -u username -p --opt --databases --com

Re: Help with DELETE and a subquery

2003-07-27 Thread Don Read
On 25-Jul-2003 Vikram Vaswani wrote: > mysql> SELECT * FROM branches; > +--+-++--+ >| bid | cid | bdesc | bloc | > +--+-++--+ >| 1011 | 101 | Corporate HQ | CA |

RE: Help with DELETE and a subquery

2003-07-27 Thread Fatt Shin
Try this ... Delete from clients where 0 = (select count(*) from branches where branches.cid = clients.cid) Cheers FattShin -Original Message- From: Vikram Vaswani [mailto:[EMAIL PROTECTED] Sent: Friday, July 25, 2003 9:51 PM To: Nils Valentin; [EMAIL PROTECTED] Subject: Re: Help with

Re: Help with DELETE and a subquery

2003-07-25 Thread Info
Estoy tomando el sol . q -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Help with DELETE and a subquery

2003-07-25 Thread Vikram Vaswani
Hey, Thanks for the help. I dont think this is possible, because MySQL will not let you delete from the same table you are reading. Is there an alternative way to do this using a subquery, you think? >ignore both previous posts. Both don't work as wanted. I just realized that >and I will come ba

Re: Help with DELETE and a subquery

2003-07-24 Thread Nils Valentin
Hi Vikram, ignore both previous posts. Both don't work as wanted. I just realized that and I will come back to you after I created the tables and made it sure. Sorry for the confusion. Best regards Nils Valentin Tokyo/Japan 2003年 7月 25日 金曜日 14:42、Nils Valentin さんは書きました: > Hi Vikram, > > just

Re: Help with DELETE and a subquery

2003-07-24 Thread Nils Valentin
Hi Vikram, just read the post once more. I made a mistake. You want to delete the clients with no branches you said, so the command should look like mysql> delete from clients where cid = (select clients.cid from clients left join branches using (cid) WHERE ISNULL(clients.cid); Note that cid

Re: Help with DELETE and a subquery

2003-07-24 Thread Nils Valentin
Hi Vikram, NULL is a special data type and requires special procedures. Try this: > mysql> delete from clients where cid = (select clients.cid from clients > left join branches using (cid) WHERE ISNULL(bid); Please make NO SPACE betwen ISNULL and (bid) as otherwise wit will give you an syntax

Re: HELP WITH mySQL!!!

2003-07-23 Thread Nils Valentin
Hi Michael, I a not 100% sure if I understood you correctly, but what you want to do seems to be better made in the application itself, rather then the SQL code. However you can use ALIASES together with the GROUP BY function and specify 2 columns (Cars and COUNT(Monthofyear) which should list

RE: * HELP * MySQL Connection Issue - Access Denied!!

2003-07-18 Thread Ryan Schefke
! -Original Message- From: Ryan Schefke [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2003 11:05 AM To: 'Jason k Larson' Subject: RE: * HELP * MySQL Connection Issue - Access Denied!! Hey Jason - Thanks a ton for your help! You're a lifesaver! When I use 'localhost&#x

RE: Help!!!

2003-07-18 Thread Rudy Metzger
CREATE TABLE NAME ( SELECT name, work FROM A UNION ALL SELECT name, home FROM A WHERE home IS NOT NULL ); CREATE TABLE ADDRESS ( SELECT work FROM A UNION ALL SELECT home FROM A WHERE home IS NOT NULL ); Cheers /rudy -Original Message- From: Colt Br

RE: [HELP] Newbie experiences problems AND receives no help for the moment

2003-07-07 Thread Andy Eastham
Matthias, I, like everyone else on the list it appears, have no idea how to help you as you have provided no example of what you are trying to do, no output and no error messages. Remember everyone gives help here for free, so people tend to help people who make it clear what the problem is. I k

RE: Help with privilege tables - IMPORTANT

2003-07-01 Thread Twibell, Cory L
Egor, It says 'update command denied to user: 'any user i put here' for table 'test2' No matter what user/host combination I use I ALWAYS get this error. -Original Message- From: Egor Egorov [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2003 5:13 AM To: [EMA

Re: Help with privilege tables - IMPORTANT

2003-07-01 Thread Egor Egorov
"Twibell, Cory L" <[EMAIL PROTECTED]> wrote: > > I have the user table which contains user record > | Host | User| Pass | Select...| > --- > |% || | N... | > > The db record is > | Host | Db| User | Select...| > --

RE: Help with privilege tables - IMPORTANT

2003-06-30 Thread Mike Hillyer
IL PROTECTED] > Subject: RE: Help with privilege tables - IMPORTANT > > > Yes, I have the UPDATE for table B. I belive this is a bug. > > -Original Message- > From: Mike Hillyer [mailto:[EMAIL PROTECTED] > Sent: Monday, June 30, 2003 4:47 PM > To: Twibell, Cory L

RE: Help with privilege tables - IMPORTANT

2003-06-30 Thread Twibell, Cory L
Yes, I have the UPDATE for table B. I belive this is a bug. -Original Message- From: Mike Hillyer [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2003 4:47 PM To: Twibell, Cory L; [EMAIL PROTECTED] Subject: RE: Help with privilege tables - IMPORTANT Hmm, if you have UPDATE privilege on

RE: Help with privilege tables - IMPORTANT

2003-06-30 Thread Mike Hillyer
, June 30, 2003 4:26 PM > To: Mike Hillyer; Twibell, Cory L; [EMAIL PROTECTED] > Subject: RE: Help with privilege tables - IMPORTANT > > > Ok, the user has the appropriate privileges in the db table. > The user can select, insert, update, deletewhatever. > What he CAN'

RE: Help with privilege tables - IMPORTANT

2003-06-30 Thread Twibell, Cory L
003 4:22 PM To: Twibell, Cory L; [EMAIL PROTECTED] Subject: RE: Help with privilege tables - IMPORTANT Well, with that in mind, does the user have the appropriate INSERT privileges? Regards, Mike Hillyer www.vbmysql.com > -Original Message- > From: Twibell, Cory L [mailto:[EMAI

RE: Help with privilege tables - IMPORTANT

2003-06-30 Thread Mike Hillyer
IL PROTECTED] > Subject: RE: Help with privilege tables - IMPORTANT > > > My user in the user table has NO privileges. All privileges > for that user > are done in the db table. Using MySQL 4.1.0-alpha > > -Original Message- > From: Mike Hillyer [mailto:[EMAIL PROTEC

<    4   5   6   7   8   9   10   11   12   13   >