Re: Problem with a Procedure

2007-12-12 Thread Tomas Hylander
Hi!
As I wrote before this works fine and I DO get a nice result;

SELECT SUM(trans2.nettovikt) as summa FROM trans2 INNER JOIN artikel on
trans2.artikel=artikel.artikel WHERE trans2.transtid between '2007-07-01
00:00:00' and '2007-07-02 23:59:59' and artikel.reservinteger='01' group by
artikel.volympris;

For a brief moment, it seemed to work but now I only get this "no
data..."-answer.

All tables exist in the selected DB and the are full with lovely data
I use the same user as in the query browser.

Thanks!
/Tomas

On Dec 13, 2007 3:29 AM, Martin Gainty <[EMAIL PROTECTED]> wrote:

> Hi Tomas
>
>  I'll need more info so I could follow up
> Do all the Tables exist in the currently selected DB?
> Do all the tables have data?
> Does the current user you are using to run the Procedure have the DML
> permission to create/query/insert/update or execute?
>
> M--
> - Original Message -
> From: "Tomas Hylander" <[EMAIL PROTECTED]>
> To: "Martin Gainty" <[EMAIL PROTECTED]>
> Cc: 
> Sent: Monday, November 26, 2007 1:38 AM
> Subject: Re: Problem with a Procedure
>
>
> > Hi!
> > I must say I cant see how this would help me. I know the tabels isnt
> > empty since when running in query browsern I get a result.
> > There must be something else thats wrong..
> >
> > ...but thanks anyway!
> > /Hylsan
> >
> > On Nov 23, 2007 4:43 PM, Martin Gainty <[EMAIL PROTECTED]> wrote:
> > >
> > >  Tomas-
> > >
> > > I would effect a quick iterative check on the table(s) to see if they
> are
> > > empty e.g.
> > >
> > >  SELECT count(trans2.nettovikt) from trans2;
> > >
> > > (If recordcount>0) then
> > >  SELECT SUM(trans2.nettovikt)
> > >
> > >  FROM trans2 INNER JOIN artikel on trans2.artikel=artikel.artikel
> > >
> > > (If recordcount>0) then
> > >
> > >  SELECT SUM(trans2.nettovikt) INTO ut_summa
> > >  FROM trans2 INNER JOIN artikel on trans2.artikel=artikel.artikel
> > >  WHERE trans2.transtid between 'datum1' and 'datum2'
> > >
> > >  (If recordcount > 0) then
> > >
> > >   SELECT SUM(trans2.nettovikt) INTO ut_summa
> > >   FROM trans2 INNER JOIN artikel on trans2.artikel=artikel.artikel
> > >   WHERE trans2.transtid between 'datum1' and 'datum2'
> > >and artikel.reservinteger='skatt'
> > >
> > >  (If recordcount > 0) then
> > >
> > >   SELECT SUM(trans2.nettovikt) INTO ut_summa
> > >   FROM trans2 INNER JOIN artikel on trans2.artikel=artikel.artikel
> > >   WHERE trans2.transtid between 'datum1' and 'datum2'
> > >and artikel.reservinteger='skatt'
> > >   group by artikel.volympris;
> > >
> > > Does this help???
> > >
> > > Martin Gainty
> > >
> > > __
> > > Disclaimer and confidentiality note
> > > Everything in this e-mail and any attachments relates to the official
> > > business of Sender. This transmission is of a confidential nature and
> Sender
> > > does not endorse distribution to any party other than intended
> recipient.
> > > Sender does not necessarily endorse content contained within this
> > > transmission.
> > >
> > >
> > > > Date: Fri, 23 Nov 2007 11:10:47 +0100
> > > > From: [EMAIL PROTECTED]
> > > > To: mysql@lists.mysql.com
> > > > Subject: Problem with a Procedure
> > >
> > >
> > > >
> > > > Hi!
> > > > Hope you can help me with this one.
> > > > Im trying to learn this with stored procedures and optimize my
> databases.
> > > > Can someone point what wrong with this?
> > > >
> >
> >
> --
> 
> > > >
> > > > DELIMITER $$
> > > >
> > > > DROP PROCEDURE IF EXISTS `vagsql`.`sok` $$
> > > > CREATE [EMAIL PROTECTED] PROCEDURE `sok`(skatt int,
> > > > datum1 DATE,
> > > > datum2 DATE,
> > > > OUT ut_summa decimal(8,2))
> > > > BEGIN
> > > >
> > > > SELECT SUM(trans2.nettovikt) INTO ut_summa
> > > > FROM trans2 INNER JOIN artikel on trans2.artikel=artikel.artikel
> > > > WHERE trans2.transtid between 'dat

Re: Problem with a Procedure

2007-11-25 Thread Tomas Hylander
Hi!
I must say I cant see how this would help me. I know the tabels isnt
empty since when running in query browsern I get a result.
There must be something else thats wrong..

...but thanks anyway!
/Hylsan

On Nov 23, 2007 4:43 PM, Martin Gainty <[EMAIL PROTECTED]> wrote:
>
>  Tomas-
>
> I would effect a quick iterative check on the table(s) to see if they are
> empty e.g.
>
>  SELECT count(trans2.nettovikt) from trans2;
>
> (If recordcount>0) then
>  SELECT SUM(trans2.nettovikt)
>
>  FROM trans2 INNER JOIN artikel on trans2.artikel=artikel.artikel
>
> (If recordcount>0) then
>
>  SELECT SUM(trans2.nettovikt) INTO ut_summa
>  FROM trans2 INNER JOIN artikel on trans2.artikel=artikel.artikel
>  WHERE trans2.transtid between 'datum1' and 'datum2'
>
>  (If recordcount > 0) then
>
>   SELECT SUM(trans2.nettovikt) INTO ut_summa
>   FROM trans2 INNER JOIN artikel on trans2.artikel=artikel.artikel
>   WHERE trans2.transtid between 'datum1' and 'datum2'
>and artikel.reservinteger='skatt'
>
>  (If recordcount > 0) then
>
>   SELECT SUM(trans2.nettovikt) INTO ut_summa
>   FROM trans2 INNER JOIN artikel on trans2.artikel=artikel.artikel
>   WHERE trans2.transtid between 'datum1' and 'datum2'
>and artikel.reservinteger='skatt'
>   group by artikel.volympris;
>
> Does this help???
>
> Martin Gainty
>
> __
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and Sender
> does not endorse distribution to any party other than intended recipient.
> Sender does not necessarily endorse content contained within this
> transmission.
>
>
> > Date: Fri, 23 Nov 2007 11:10:47 +0100
> > From: [EMAIL PROTECTED]
> > To: mysql@lists.mysql.com
> > Subject: Problem with a Procedure
>
>
> >
> > Hi!
> > Hope you can help me with this one.
> > Im trying to learn this with stored procedures and optimize my databases.
> > Can someone point what wrong with this?
> >
> --
> >
> > DELIMITER $$
> >
> > DROP PROCEDURE IF EXISTS `vagsql`.`sok` $$
> > CREATE [EMAIL PROTECTED] PROCEDURE `sok`(skatt int,
> > datum1 DATE,
> > datum2 DATE,
> > OUT ut_summa decimal(8,2))
> > BEGIN
> >
> > SELECT SUM(trans2.nettovikt) INTO ut_summa
> > FROM trans2 INNER JOIN artikel on trans2.artikel=artikel.artikel
> > WHERE trans2.transtid between 'datum1' and 'datum2'
> > and artikel.reservinteger='skatt'
> > group by artikel.volympris;
> >
> > END $$
> >
> > DELIMITER ;
> >
> >
> 
> >
> > call sok('01','2007-01-01 00:00:00', '2007-01-10 23:59:59', @out);
> > select @out;
> >
> > All I get is that "No data - zero rows fetched, selected or processed"
> >
> > When running this in query brower everything looks ok.
> > SELECT SUM(trans2.nettovikt) as summa FROM trans2 INNER JOIN artikel on
> > trans2.artikel=artikel.artikel WHERE trans2.transtid between '2007-07-01
> > 00:00:00' and '2007-07-02 23:59:59' and artikel.reservinteger='01' group
> by
> > artikel.volympris;
> >
> > Im running mysql 5.1.11.
> >
> > Thanks in advance!
> > /Tomas
>
>
> 
> Share life as it happens with the new Windows Live. Share now!

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Problem with a Procedure

2007-11-23 Thread Tomas Hylander
Hi!
Hope you can help me with this one.
Im trying to learn this with stored procedures and optimize my databases.
Can someone point what wrong with this?
--

DELIMITER $$

DROP PROCEDURE IF EXISTS `vagsql`.`sok` $$
CREATE [EMAIL PROTECTED] PROCEDURE `sok`(skatt int,
datum1 DATE,
datum2 DATE,
OUT ut_summa decimal(8,2))
BEGIN

SELECT SUM(trans2.nettovikt) INTO ut_summa
FROM trans2 INNER JOIN artikel on trans2.artikel=artikel.artikel
WHERE trans2.transtid between 'datum1' and 'datum2'
and artikel.reservinteger='skatt'
group by artikel.volympris;

END $$

DELIMITER ;



call sok('01','2007-01-01 00:00:00', '2007-01-10 23:59:59', @out);
select @out;

All I get is that "No data - zero rows fetched, selected or processed"

When running this in query brower everything looks ok.
SELECT SUM(trans2.nettovikt) as summa FROM trans2 INNER JOIN artikel on
trans2.artikel=artikel.artikel WHERE trans2.transtid between '2007-07-01
00:00:00' and '2007-07-02 23:59:59' and artikel.reservinteger='01' group by
artikel.volympris;

Im running mysql 5.1.11.

Thanks in advance!
/Tomas


RE: Querry Count Rows

2007-10-01 Thread Tomas Abad
Very well, Works, thanks.

-Mensaje original-
De: Ananda Kumar [mailto:[EMAIL PROTECTED] 
Enviado el: lunes, 01 de octubre de 2007 13:16
Para: [EMAIL PROTECTED]
CC: mysql@lists.mysql.com
Asunto: Re: Querry Count Rows

can u please give sample data.
If the same city has more than one order_id then, you could use this

select city,count(*) "total"  from table group by city order by total desc
limit 10;

regards
anandkl


On 10/1/07, Tomas Abad <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
>
>
> I have a table with ordes and i want to know the top 10 Citys have the
> most
> ordes. This is my table
>
>
>
> Order_id, City
>
>
>
> Need count the rows where haver the most similar text y the column City?
>
>
>
>
>
> Thanks all
>
>
>
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Querry Count Rows

2007-10-01 Thread Tomas Abad
Hi all,

 

I have a table with ordes and i want to know the top 10 Citys have the most
ordes. This is my table

 

Order_id, City

 

Need count the rows where haver the most similar text y the column City?

 

 

Thanks all

 



Simple questio SQL

2007-09-05 Thread Tomas Abad
HI All,

 

I have a Table and want to know the most visited products.

 

Products

-  Id

-  Name

-  Visited

 

Visited is numeric.



Re: Delete query problem

2005-12-21 Thread Tomas Rasek

What about

DELETE master_tbl,detail_tbl FROM master_tbl LEFT JOIN detail_tbl ON 
master_tbl.ID=detail_tbl.ID WHERE .


T.R.


Dušan Pavlica napsal(a):

Hello, 
I have master-detail tables and I would like to delete in one statement master record and all detail records but not every master record has details. 
MySQL versions 4.1.10 and higher.

Could someone help me, please, to create such a query?

Example:
CREATE TABLE  `master_tbl` (
 `ID` int(10) unsigned NOT NULL auto_increment,
 `Desc` varchar(45) NOT NULL default '',
 `Data` varchar(45)  NOT NULL default '',
 PRIMARY KEY  (`ID`)
) ENGINE=InnoDB;

CREATE TABLE  `detail_tbl` (
 `Master_ID` int(10) unsigned NOT NULL default '0',
 `ID` int(10) unsigned NOT NULL default '0',
 `Desc` varchar(45) NOT NULL default '',
 PRIMARY KEY  (`Master_ID`)
) ENGINE=InnoDB;

This query works only for master records which have at least one detail record:
DELETE master_tbl, detail_tbl FROM master_tbl, detail_tbl

WHERE detail_tbl.Master_ID = master_tbl.ID AND master_tbl.ID = 10



Thanks in advance

Dusan Pavlica

 




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



mysql crashing after restore

2004-12-25 Thread Tomas Clements
Hello,
I have a server that was using raid5.  I also did a daily rsync
from the machine.  The raid5 failed and the data was lost.  I recopied all
of the data back to the machine from the backup.  Most of which was a 133G
ibdata1 file.  Now when I try to start mysql I get the following:

--

enough to kill the drive.  
041225 22:19:56  mysqld started
041225 22:19:56  InnoDB: Database was not shut down normally.
InnoDB: Starting recovery from log files...
InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 90 3664440544
InnoDB: Doing recovery: scanned up to log sequence number 90 3669579776
041225 22:19:56  InnoDB: Assertion failure in thread 16384 in file
../../innobase/in
clude/page0page.ic line 482
InnoDB: Failing assertion: offs < UNIV_PAGE_SIZE
InnoDB: We intentionally generate a memory trap.
InnoDB: Send a detailed bug report to mysql@lists.mysql.com
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose
the problem, but since we have already crashed, something is definitely
wrong
and this may fail.



key_buffer_size=8
read_buffer_size=16773120
max_used_connections=0
max_connections=1000
threads_connected=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections =
3403864 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x8381228
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Bogus stack limit or frame pointer, fp=0xbfffd9a8, stack_bottom=0x59f57c70,
thread_s
tack=196608, aborting backtrace.
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x58e0af80  is invalid pointer
thd->thread_id=-1398035799
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.
041225 22:19:56  mysqld ended
-


It told me to submit this so I am.

I don't know the cause of this.  I believe that because the file was copied
while in use (from the rsync) that it was not "closed" correctly.  Because
of that it's trying to scan the file for errors, but because of it's size
it is failing.

Any help you can offer would be greatly appreciated.

Thanks in advance,
-- 
Tomas Clements
http://www.national-net.com

NationalNet is committed to the highest level of Customer Service available
in the Web Hosting business.  If you have any questions, comments or
concerns feel free to contact us at 770-471-9075 ext 1 (or toll-free,
877-471-9075 ext 1).


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: BLOB, SUBSTRING and 65536 characters limit

2004-03-12 Thread Tomas Zvala
I'm sorry,
the problem was of course between keyboard and chair. I didn't realize 
I'm using BLOB which is limited to 65536 characters insted of longblob 
that is quite larger.
Thanks for your answers.

Tomas



Tomas Zvala wrote:
Hello,
I run into a problem where I need to get contents of BLOB to my php 
script. I found out that I'm limited by max_packet_size (which i can't 
change because of my ISP) and i tried to work around it by using SELECT 
substring(column,x,1024) where x is number increasing in steps of 1024. 
But once x reaches 65536 i get empty result.
What am I doing wrong or how can I work around this?

I'm using MySQL 4.0.14 running on FreeBSD 4.9.

Thanks in advance for your help,

Tomas Zvala

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


BLOB, SUBSTRING and 65536 characters limit

2004-03-11 Thread Tomas Zvala
Hello,
I run into a problem where I need to get contents of BLOB to my php 
script. I found out that I'm limited by max_packet_size (which i can't 
change because of my ISP) and i tried to work around it by using SELECT 
substring(column,x,1024) where x is number increasing in steps of 1024. 
But once x reaches 65536 i get empty result.
What am I doing wrong or how can I work around this?

I'm using MySQL 4.0.14 running on FreeBSD 4.9.

Thanks in advance for your help,

Tomas Zvala

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


PROBLEMS WITH DELETE

2003-12-26 Thread Tomas Isakowitz
The following query does not work. It fits the exact format of DELETE in 
the documentation.

DELETE from price WHERE ticker ='MSFT' ORDER BY date DESC LIMIT 3;

I am trying to delete the most recent 3 records. I get an error "You 
have an error in your SQL syntax near 'ORDER BY date LIMIT 3' at line 1"

If I take the "ORDER BY date" portion, the query works OK. The problem 
is that this is not what I need.

Anyone  out there knows what is going on?

Thanks

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


myodbc or server problem

2002-08-01 Thread Tomas Mas Esteve

Hello all,
y send an SQL to server by VB & ADO.

y traced from ODBC and I obtained this trace:

GESTION fd28fee3-fd2805ff   ENTER SQLExecDirectW
HSTMT   02361D94
WCHAR * 0x01B46750 [ 211] "INSERT INTO 
macbase_totales.recibos SET factura='4305', sub_factura='1', cod_cliente='58', 
importe='1441.58', fecha_emision='2001/07/20', fecha_vencimiento='2001/08/13', 
riesgo='1441.58', moneda='1', cobrado=1 ;"
SDWORD   211

GESTION fd28fee3-fd2805ff   EXIT  SQLExecDirectW  with return code -1 
(SQL_ERROR)
HSTMT   02361D94
WCHAR * 0x01B46750 [ 211] "INSERT INTO 
macbase_totales.recibos SET factura='4305', sub_factura='1', cod_cliente='58', 
importe='1441.58', fecha_emision='2001/07/20', fecha_vencimiento='2001/08/13', 
riesgo='1441.58', moneda='1', cobrado=1 ;"
SDWORD   211

DIAG [S1000] [TCX][MyODBC]Got error -1 from table handler (1030)

Does anyone knows the real problem?, because I show in ODBC driver documentation:

515  S1000  HY000  General driver defined error  

that an S1000 is an general error.

Can someone help me?

Thanks in advance

-- 
__
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

Get 4 DVDs for $.49 cents! plus shipping & processing. Click to join. 
http://adfarm.mediaplex.com/ad/ck/990-1736-3566-59


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Alpha 4 would have been beta Q4/2001

2002-05-06 Thread Tomas

>"...Users are not recommended to switch their production systems to MySQL 4.0 
>until it is released in beta version later Q4/2001..."
Source: http://www.mysql.com/products/mysql-4.0/index.html

Well, now it is Q2/2002 What is the new date for the beta release
?

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Choosing between 3.23.46 or 4.0.1 alpha

2002-05-04 Thread Tomas

My new webhost has these two mysql servers installed:
MySQL 3.23.46
MySQL 4.0.1 alpha
which I am going to choose between...
(They say they first installed the alpha just for testing because some
customers requested it, but then kept it because they then thought it
was quite stable)

The best thing is of course great performance *and* great reliability
(that the data doesn't change in a way it should not..) but the
question is to know how *much* faster the  alpha 4 is than the 3.23,
and how *much* more reliable the 3.23 is ?

So, more specifically, the question is if someone has made a test to
compare these two database engines with databases with the same data,
and testing the performance for the same queries, and also generated
lots of updates (with many simultaneous simulated users) and checked
if the result is as expected ?

The transaction is indeed a nice feature, but only if you really can
trust the rollbacks to be performed correctly, so has there been some
reviews/tests for the reliability of the alpha 4 rollback
functionality ?

If someone does not know an exact URL to tests I am looking for, maybe
someone has some generally interesting site tips about database web
sites which is devoted to doing these kind of database engine
tests/reviews ?

Regards,
Tomas

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




joining tables from selected values

2002-04-01 Thread Tomas Sanchez

Hi!

Id would like to have 4 tables

files (
id int(8),
type set("directory", "file", "link"),
)

files_directory (
id int(8),
is_files int(8),
name varchar(20)
...
)

files_file (
id int(8),
is_files int(8),
name varchar(20)
...
)

files_link (
id int(8),
is_files int(8),
name varchar(20)
...
)

And be able to make one query to get the info from, for example the 
"files_directory"-table just having an id for the "files"-table, such as:

select files.type as #type, files_#type.* from files, files_#type where 
files.id =$id and files_$type.is_files=$id

$id is a value from php-script
#type is a for me imaginary value that I would like mysql to generate and 
being able to use.

is this possible, or should I rename the values in the "files.type"-set to 
"files_directory, files_file, "files_link"? or wouldn't this help either?

regards, tomas


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




getting files into BLOBs and some more

2002-03-26 Thread Tomas Sanchez Romani

Hi!


I'm thinking of creating a quite simple filemanager, using mysql/php, for a
groupware-suite.

My first approach was to just create a directory-tree on the webserver and
let my app mirror that, then I realised that I needed some privilege-system
and thus mysql.



How do I insert files inte BLOBs?



Maybe it would be better to still use a 'real' directory tree and just keep
track of the privileges with mysql? I don't know. pointers, please


regards, tomas

ps. this is my first post on this mailinglist, if you find this kind of
post/post-formatting unacceptable let me know (in private) and I'll change
the style.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.338 / Virus Database: 189 - Release Date: 2002-03-14


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Sum function not uses a valid decimal separator.

2001-10-26 Thread David Tomas Fargas

Sorry about that because there probably will be a stupid question but

I'm from Spain, and i use the "," to represent decimal separator :
123.456,01 ?
well, the function sum in mysql 3.23.42 belive that "." is the decimal
separator and then when he finds a "," separator in a field returns results
that they aren't true.

How can I change the character that mysql uses to represent decimal
separator?

Thanks a lot for your time and sorry about my bad english...

David Tomas Fargas


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




multi table update

2001-10-24 Thread Tomas Carmen

Hi list:

How can I update a table field from a another table field, the
multitable update is not implemented  or yes?.
I am thinking in use a foreign key (references) or tmp table or can I
use table aliases? something like this:

replace into table master( fielda, fieldb , fieldc) select t1.fielda,
t1.fieldb, t2.fieldx from master as t1 left join t2 on
t1.fielda=t2.fielda;

Any suggestion

Thanks in advance.

-- 
Tomas Carmen R.
TCC S.A.
telef.:+51-1-4428842
fax  : +51-1-4426434

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: mysqldump issues

2001-08-29 Thread Tomas Carmen

daniel james wrote:
> 
> I need to generate a tab-delimited text dump of table
> data ONLY and have it output to a text file. I don't
> want any table info, delimiters, etc.  I need this to
> copy/paste into a excel spreadsheet.  What's the
> syntax?
> 
> I'm stuck here:

Hi: 
What do you think about: 

select fields from table  into outfile 'file' 
  


> 
> % mysqldump dbname tablename > ???
> 
> pleasepleaseplease help..!
> 
> __
> Do You Yahoo!?
> 
-- 
Tomas Carmen R.
TCC S.A.
telef.:+51-1-4428842
fax  : +51-1-4426434

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




problem with mysql-3.23.39 server

2001-07-20 Thread Tomas Norre

Hello there.

When I install Mysql-3.23.39 at my OpenBSD 2.9 server, it works perfectly..
until i restart the server.. does anyone have had the same problems as I ?

plz write back.. I just get this command, when i try to start the mysqld
server. with safe_mysqld

# safe_mysqld
/usr/libexec/ld.so: my_print_defaults: libpthread.so.14.20: No such file or
dire
ctory
Starting mysqld daemon with databases from /var/mysql
010720 19:56:33  mysqld ended

i have write /usr/local/lib/pth in the ld path. in rc.conf

and the file does exist at the computer under /usr/local/lib/pth

help me plz..  What to do.. 

by the way.. this is the content of my w3.err file.. (logfile)

010720 19:56:53  mysqld started
/usr/libexec/ld.so: mysqld: libpthread.so.14.20: No such file or directory
010720 19:56:53  mysqld ended

>From Tomas..


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Backup of databases.

2001-07-19 Thread Tomas Norre

Hello there.

I have a problem..

i cannot start my mysqld server on my Unix OpenBSD 2.9 Server, because i
have a problem after i have restarted my server.

So  how do i take backups without connecting to the mysqld server, i have
access to the files that is placed in /var/mysql

but i cannot you mysqldump because of the server not is started and not can
be started..

What to do ?

Help me please

/Tomas


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Dificult question.....

2001-07-13 Thread David Tomas Fargas

Well, sorry about my worst explanation :)

The table is a Spain Postal Codes Table.
It has fields: Cod(5),Descr(100),Country(3),IND(13),ORD(3).
All are varchars.
Because there are possible to have the same Postal Codes and diferent
description or different country, The Primary Index is IND that it's a
combinated unique field (country+"#"+cod+"#"+ord)
Cod are indexed
Descr are Indexed
ORD are Indexed
The Table have 59324 Records actually and all were from Spain and then the
clause where with field country has no effect.


When I execute "Select * from cpostal order by cod", the response takes
about 3 or 4 seconds.

It's very big time!

Well. I need to create a window that maintains the postal codes and I need
Cod Descr, and Country fields for that. The Window simple have a few
buttons(First, Previous, Next, Last, New, Delete...etc.) That needs The
complete big recordset or the simple little recordset with a limit clause.

But The form, can search a value from the totally table. I think i found it
by where clauses but when I find it I need to maintain the functionality of
those buttons, and then, if I didn't know the relative position in the
sorted table, how can I present the previous or next record of the record I
Found?

Well it seems to be continued a worst explanation :(

Sorry about that but my english are worst! :(




Thanks a lot for your time.



-Mensaje original-
De: Don Read [mailto:[EMAIL PROTECTED]]
Enviado el: viernes, 13 de julio de 2001 18:14
Para: David Tomas Fargas
CC: [EMAIL PROTECTED]
Asunto: RE: Dificult question.



On 13-Jul-01 David Tom`s Fargas wrote:
> I Have a large table with 59.000 records and if i execute a simple select
> since "Select * from table order by cod" it takes 4 seconds to process
> query!
> and if table will have 590.000 then... well, you see it.
>
> It's possible to accelerate it, without where and limit clausules?
>

do you have an index on cod ?

> I think no, and in my find of solutions I develop an idea...
>
> If I execute the same query with a where clausule with unique value, and
> limit clausule to 1 value it results fine in an instant.
> Ok I have one record, and I need to go to next or previous record...
>
> And then...it's a big problem!
>
> Because the query is sorted and, of course, I don't have any idea the
> primary value for the next and previous record, How can I execute another
> query to obtain those records?
>
> I think I need a "imaginary value" in te record that gives me the position
> of the current record in a totally table. Because the table are sorted,
the
> autonumeric fields can't help me.
>

 sorted ?

> And if i simple use a variable in my application to monitoring the
> ficticious sorted position and play with the limit clause, I will can't
set
> big jumps fast between records  such a search tool ...
>
> how can I get this "imaginary value"?
>

You lost me.
Please post describe table and a couple of example rows of the dataset

Regards,
--
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to
   steal the neighbor's newspaper, that's the time to do it.



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Cannot start the server after restart.

2001-06-23 Thread Tomas Norre


Hello.. Friends

I have just installed my OpenBSD 2.9 with mysql 3.23.37 and when i wanted to
startet i can do it first time, but if i have to restart the server. I
cannot start it again, why?

i come with this error.

w3# safe_mysqld
/usr/libexec/ld.so: my_print_defaults: libpthread.so.14.20: No such file or
directory
Starting mysqld daemon with databases from /var/mysql
010622 17:20:08  mysqld ended


>From Tomas


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Cannot start.

2001-06-22 Thread Tomas Norre


Hello.. Friends

I have just installed my OpenBSD 2.9 with mysql 3.23.37 and when i wanted to
startet i can do it first time, but if i have to restart the server. I
cannot start it again, why?

i come with this error.

w3# safe_mysqld
/usr/libexec/ld.so: my_print_defaults: libpthread.so.14.20: No such file or
directory
Starting mysqld daemon with databases from /var/mysql
010622 17:20:08  mysqld ended


>From Tomas


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Cannot start.

2001-06-22 Thread Tomas Norre

Hello.. Friends

I have just installed my OpenBSD 2.9 with mysql 3.23.37 and when i wanted to
startet i can do it first time, but if i have to restart the server. I
cannot start it again, why?

i come with this error.

w3# safe_mysqld
/usr/libexec/ld.so: my_print_defaults: libpthread.so.14.20: No such file or
directory
Starting mysqld daemon with databases from /var/mysql
010622 17:20:08  mysqld ended


>From Tomas


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Error in starting the server

2001-06-12 Thread Tomas Norre

First... I want to start mysqld server... but the error was showen..

---Try starting the
mysqld -

w3# safe_mysqld
/usr/libexec/ld.so: my_print_defaults: libpthread.so.14.20: No such file or
directory
Starting mysqld daemon with databases from /var/mysql
010612 13:09:11  mysqld ended




-Locked in the err file of
mysql-

w3# mg /var/mysql/w3.err

{begin of file - w3.err}

010612 00:00:26  mysqld started
/usr/local/libexec/mysqld: ready for connections
010612  0:05:26  /usr/local/libexec/mysqld: Binlog closed, cannot RESET
MASTER

Status information:

Current locks:
key_cache status:
blocks used: 1
not flushed: 0
w_requests:  0
writes:  0
r_requests:  0
reads:   0

handler status:
read_key:0
read_next:   0
read_rnd 0
read_first:  0
write:   0
delete   0
update:  0

Table status:
Opened tables:  0
Open tables:0
Open files: 0
Open streams:   0
010612 12:59:41  /usr/local/libexec/mysqld: Normal shutdown

010612 13:05:49  mysqld started
/usr/libexec/ld.so: mysqld: libpthread.so.14.20: No such file or directory
010612 13:05:49  mysqld ended

010612 13:09:11  mysqld started
/usr/libexec/ld.so: mysqld: libpthread.so.14.20: No such file or directory
010612 13:09:11  mysqld ended

{End of file - w3.err }

can someone please try to help me solving this problem ?

>From Tomas alias Milpoer.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




How to convert MS Access mdb to Mysql

2001-06-06 Thread Tomas Norre

Hello..

is it possible to convert a whole ms access database (mdb) to a mysql
database if so.. howto ?

from

Milpoer


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




ERROR 1114

2001-05-30 Thread Tomas Carmen

Hi:
Someone knows why I am getting this error after some left joins between
3 tables or more tables.

ERROR 1114 at line 292: The table 'SQL202_0'  is full

It's only  whith more than 8000 rows moreless.

I'm working with mysql 3.22.27 (server an client) on RH 7.1

Can you help me, please?

Thanks in advance

Tomas Carmen R.



Re: Hierarchical lists

2001-04-09 Thread Tomas Eriksson

just some thoughts, this is a nice way of creating one "tree"-table of unlimited 
levels, top-level-items has for example parent_id -1, and if you want to get the items 
(the childs of a parent) just say 

select * from items where parent_id = x


create table items (
item_id int unsigned not null auto_increment
parent_id int unsigned not null default -1
somedata varchar(1000)
)

kinds regards
Tomas

- Original Message - 
From: "Realbad Atgames" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 1:12 AM
Subject: Hierarchical lists


> Hello, I'm new to MySQL and have ran into a problem in
> designing my database. I have a table of items, A, and
> each item should have any number of other records from
> another table, B, associated with it. I also need to
> have any number of records from table C associated
> with table B. They need to be associated in such a way
> that I can quickly find out what is associated with a
> record in table A, as well as what is associated with
> a record in table B. In other words, how do I store an
> array of pointers? What's the best way to do this? I
> couldn't find anything relevant in the docs.
> 
> Any help greatly appreciated.
> 
> 
> 
> __
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail. 
> http://personal.mail.yahoo.com/
> 
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 
> 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Re: Avoiding roundtrips

2001-04-06 Thread Tomas Eriksson

Thanks for your answers,

Sorry for not being clearly...i mean like select into temporary/select into another 
temp/select the result from these in just one "sql-string". I tried separating with 
both ; and \n but it complains about syntax error near this. I thought that doing 5+ 
or something separate query-executions could take down the perfomance. I'm using Perl 
DBI.

kinds regards
Tomas

- Original Message - 
From: "Sinisa Milivojevic" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, April 06, 2001 1:52 PM
Subject: Re: Avoiding roundtrips


> Tomas Eriksson writes:
>  > Hi.
>  > 
>  > I guess we all are waiting for subselects in Mysql...but can you do many 
>  > sql-commands in a single execution, with a nice finally-result-select at 
>  > the end? Many roundtrips feels bad...
>  > 
>  > kind regards
>  > Tomas
> 
> 
> I truly do not understand what feature are you looking for.
> 
> You can always build multithreaded client with C++ or Perl.
> 
> 
> Regards,
> 
> Sinisa
> 
>     __ _   _  ___ ==  MySQL AB
>  /*/\*\/\*\   /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic
> /*/ /*/ /*/   \*\_   |*|   |*||*| mailto:[EMAIL PROTECTED]
>/*/ /*/ /*/\*\/*/  \*\|*|   |*||*| Larnaca, Cyprus
>   /*/ /*/  /*/\*\_/*/ \*\_/*/ |*|
>   /*/^^^\*\^^^
>  /*/ \*\Developers Team
> 
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 
> 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Avoiding roundtrips

2001-04-05 Thread Tomas Eriksson

Hi.

I guess we all are waiting for subselects in Mysql...but can you do many 
sql-commands in a single execution, with a nice finally-result-select at 
the end? Many roundtrips feels bad...

kind regards
Tomas



RE: Problem with the UPDATE

2001-01-29 Thread Guridi, Tomas



-Mensaje original-
De: Gerald L. Clark [mailto:[EMAIL PROTECTED]]
Enviado el: lunes 29 de enero de 2001 12:53
Para: Guridi, Tomas
Cc: '[EMAIL PROTECTED]'
Asunto: Re: Problem with the UPDATE


"Guridi, Tomas" wrote:
> 
> Hi , i´m having a strange problem with the update in mysql
> i have a table named "notices" with the following fields:
> 
> id  :prymary, int, auto_increment.
> title   :varchar (255).
> priority:int.
> 
> inside this table i have 5 registers like this :
> 
> id  title   priority
> 1   a   1
> 2   b   2
> 3   c   3
> 4   d   4
> 5   e   5
> 
> now... to explain exactly what im doing y will write the exact querys im
> giving o the database.
> 
> DELETE FROM notices where id=1
> UPDATE notices SET priority=priority-1 WHERE priority > 1
> 
> The result for this should be the following:
> 
> id  title   priority
> 2   b   1
> 3   c   2
> 4   d   3
> 5   e   4
> 
> The result im getting is :
> 
> id  title   priority
> 2   b   1
> 3   c   1
> 4   d   2
> 5   e   3
> 
> i have tryed everything,
> i foud that there was a problem with the update using the "WHERE
priority>1"
> and they recommended using "WHERE priority+0 >1"
> i also try that without having good results. the part that is even more
> strange is that if i run this querys from the console of the phpMyadmin
the
> result comes out rigth. i really don´t know what to do.
> 
> i am running on a NT 4.0 platform but i also try it on a REDHAT 6.2
platform
> having the same wrong result.
> if anybody could help please let me know.
> 
You do not say what version you are running.
Older versions did not allow updating the primary key field in that
manner.

i am running version 3.23.32 of mysql in which that problem is supposed to
be fixed but any way the field that im updating is not the prymary key, the
prymary key is the field (id) and im updating the field priority.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Problem with the UPDATE

2001-01-29 Thread Guridi, Tomas

Hi , i´m having a strange problem with the update in mysql
i have a table named "notices" with the following fields:

id  :prymary, int, auto_increment.
title   :varchar (255).
priority:int.

inside this table i have 5 registers like this :

id  title   priority
1   a   1
2   b   2
3   c   3
4   d   4
5   e   5

now... to explain exactly what im doing y will write the exact querys im
giving o the database.

DELETE FROM notices where id=1
UPDATE notices SET priority=priority-1 WHERE priority > 1

The result for this should be the following:

id  title   priority
2   b   1
3   c   2
4   d   3
5   e   4

The result im getting is :

id  title   priority
2   b   1
3   c   1
4   d   2
5   e   3

i have tryed everything,
i foud that there was a problem with the update using the "WHERE priority>1"
and they recommended using "WHERE priority+0 >1"
i also try that without having good results. the part that is even more
strange is that if i run this querys from the console of the phpMyadmin the
result comes out rigth. i really don´t know what to do.

i am running on a NT 4.0 platform but i also try it on a REDHAT 6.2 platform
having the same wrong result.
if anybody could help please let me know.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




archive of old mails in lists?

2001-01-17 Thread Tomas Mas-Esteve (ECE)

Hello,
is a archive where all the mails sent to mysql list are stored?
if yes, where is the archive and how con I access to it.

Thanks

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php