Re: longtext fields in a row

2015-04-02 Thread Trianon 33
All, Unfortunatelu this didn't do the trick. I changed (with PHPMYADMIN) all fields from LONGTEXT to TEXT, all other parameters furthermore unchanged. Ran the same procedure again, but stopped updating the row at exact the same spot. How come? No idea. What I'm trying to achi

Re: longtext fields in a row

2015-04-01 Thread shawn l.green
Hi Andrew, On 4/1/2015 1:58 PM, Andrew Wallace wrote: I thought that TEXT fields only stored a pointer to the actual data in the table, not the data itself - storing 9 to 12 bytes in the table: |"BLOB| <https://dev.mysql.com/doc/refman/5.0/en/blob.html>and|TEXT| <https://dev

Re: longtext fields in a row

2015-04-01 Thread Andrew Wallace
I thought that TEXT fields only stored a pointer to the actual data in the table, not the data itself - storing 9 to 12 bytes in the table: |"BLOB| <https://dev.mysql.com/doc/refman/5.0/en/blob.html>and|TEXT| <https://dev.mysql.com/doc/refman/5.0/en/blob.html>columns count

Re: longtext fields in a row

2015-04-01 Thread Trianon 33
than placing the HTML code somewhere else, perhaps in a different table. On Wednesday, April 1, 2015, Trianon 33 <mailto:triano...@gmail.com>> wrote: Hello, I'm fiddling wit a table where I put in a date field (datetime, also key) and some integer fields (8 of them

Re: longtext fields in a row

2015-04-01 Thread Andrew Mueller
datetime, also key) > and some integer fields (8 of them mostly 14 long) and some longtext fields > (16 of them). > > The longtext fields are filled with some statistics I generate complete > with HTML around, something like this: 12.925.965 but than bigger, > but mostly sm

longtext fields in a row

2015-04-01 Thread Trianon 33
Hello, I'm fiddling wit a table where I put in a date field (datetime, also key) and some integer fields (8 of them mostly 14 long) and some longtext fields (16 of them). The longtext fields are filled with some statistics I generate complete with HTML around, something like

Re: Update just some of the fields

2013-06-17 Thread hsv
>>>> 2013/06/17 11:38 +0430, Sayyed Mohammad Emami Razavi >>>> update test set desc='test10' where id=1; <<<<<<<< _That_ is UPDATE! It is the only means of changing, but neither inserting nor deleting, a record. The other fields are

Update just some of the fields

2013-06-17 Thread Sayyed Mohammad Emami Razavi
In MySQL when i execute full update query, all fields will be updated or no? It means, which fields that have not been changed will not be updated?! e.g. current values for table named 'test', i want to update just desc: id, name, desc 1, test1, test2 update test set name='test1

Recognizing utf8 encoded data in latin1 fields/tables

2011-05-08 Thread Jigal van Hemert
Hi, The TYPO3 CMS I'm working on uses UTF-8 database fields for some time now by default. There are sometimes old installation, which have been updated without properly converting the database. The result: UTF-8 encoded data in (most often) latin1 tables/fields. I have a conversion s

Re: Design: how to prioritise 1-to-many fields

2010-12-11 Thread Jan Steinman
> From: gvim > > I have a typical contact database which caters for multiple email addresses > with a distinct Email table keyed to a foreign key inside the Contact table, > ie. a 1-to-many relationship. However, I want to prioritise these Email > entries for a given Contact entry so all I can

RE: Design: how to prioritise 1-to-many fields

2010-12-09 Thread Jerry Schwartz
>From: gvim [mailto:gvi...@gmail.com] >Sent: Thursday, December 09, 2010 9:33 AM >To: MySQL >Subject: Design: how to prioritise 1-to-many fields > >I have a typical contact database which caters for multiple email addresses >with a distinct Email table keyed to a foreign k

Re: Design: how to prioritise 1-to-many fields

2010-12-09 Thread Johan De Meersman
On Thu, Dec 9, 2010 at 3:33 PM, gvim wrote: > I have a typical contact database which caters for multiple email addresses > with a distinct Email table keyed to a foreign key inside the Contact table, > ie. a 1-to-many relationship. However, I want to prioritise these Email > entries for a given

Design: how to prioritise 1-to-many fields

2010-12-09 Thread gvim
I have a typical contact database which caters for multiple email addresses with a distinct Email table keyed to a foreign key inside the Contact table, ie. a 1-to-many relationship. However, I want to prioritise these Email entries for a given Contact entry so all I can think of is to add a nu

Question on encoding parameters and binary fields encoding (character_set_connection)

2010-09-16 Thread Filipus Klutiero
Hi, I'm finding the description of character_set_connection unclear. Does this influence the encoding of queries, but not of results? I'm wondering about the effect of connection encoding. Is there documentation on how exactly character set settings affect BLOBs? For example, "this is what

Re: Performing subtraction between fields

2010-08-21 Thread Dan Nelson
In the last episode (Aug 21), Ashish Mukherjee said: > Well, since you are searching that column, it's probably a good idea. > > Possible scenarios for not storing computed values - > > 1) Data integrity - say, the columns A and B are updated but C does not get > updated, resulting in an anomalo

Re: Performing subtraction between fields

2010-08-21 Thread Chris W
...@qxhp.com wrote: Hello, For simplicity's sake, let's say I have three fields, A, B and C, all of which are integers. I'd like the value of C to be equal to A less B (A-B). Is there a way I can perform this calculation? I'm guessing it would happen when I INSERT a row and specify th

Re: Performing subtraction between fields

2010-08-21 Thread Ashish Mukherjee
; > > > - Ashish > > > > On Sat, Aug 21, 2010 at 11:55 AM, wrote: > > > >> Hello, > >> > >> For simplicity's sake, let's say I have three fields, A, B and C, all > >> of which are integers. I'd like the value of C to be

Re: Performing subtraction between fields

2010-08-21 Thread Ashley Stars
omputed value? It's only > useful > if you will perform a search on the column, else you could just do the > subtraction when you SELECT columns A and B. > > - Ashish > > On Sat, Aug 21, 2010 at 11:55 AM, wrote: > >> Hello, >> >> For simplicity's

Re: Performing subtraction between fields

2010-08-21 Thread Ashish Mukherjee
s sake, let's say I have three fields, A, B and C, all > of which are integers. I'd like the value of C to be equal to A less B > (A-B). Is there a way I can perform this calculation? I'm guessing it > would happen when I INSERT a row and specify the values for A and B. > Feel

Re: Performing subtraction between fields

2010-08-21 Thread Mark Goodge
On 21/08/2010 07:25, b...@qxhp.com wrote: Hello, For simplicity's sake, let's say I have three fields, A, B and C, all of which are integers. I'd like the value of C to be equal to A less B (A-B). Is there a way I can perform this calculation? I'm guessing it would happen

Performing subtraction between fields

2010-08-20 Thread b
Hello, For simplicity's sake, let's say I have three fields, A, B and C, all of which are integers. I'd like the value of C to be equal to A less B (A-B). Is there a way I can perform this calculation? I'm guessing it would happen when I INSERT a row and specify the values fo

Re: update fields with a prefix - ?? how to

2009-10-19 Thread Johan De Meersman
Something in the ilk of update *table* set *field* = concat("prefix_", *field*) where *condition * should do the trick. On Mon, Oct 19, 2009 at 4:56 PM, lejeczek wrote: > dear all, a novice here > quickie regarding query syntax - is it possible to take fields values from &g

update fields with a prefix - ?? how to

2009-10-19 Thread lejeczek
dear all, a novice here quickie regarding query syntax - is it possible to take fields values from one column and update the same column with new values like this: prefix_OldValue column: one, two, three -> column: prefix_one, prefix_two, ... can this be done with one query and with on use

Re: Adding Fields To Table

2009-10-01 Thread prabhat kumar
Thanks Joerg. You are very correct. On Thu, Oct 1, 2009 at 2:40 PM, Joerg Bruehe wrote: > Hi! > > > prabhat kumar wrote: > > You can use : > > > > *ALTER TABLE it ADD COLUMN title varchar(25), phone number integer (6);* > > > > it will add new column after last. > > > > but you can also specify

Re: Adding Fields To Table

2009-10-01 Thread Joerg Bruehe
Hi! prabhat kumar wrote: > You can use : > > *ALTER TABLE it ADD COLUMN title varchar(25), phone number integer (6);* > > it will add new column after last. > > but you can also specify the particular column after you want to add. > > like. > > *ALTER TABLE it ADD COLUMN title varchar(25), p

Re: Adding Fields To Table

2009-10-01 Thread prabhat kumar
+--+-+-+---+ >> | name | varchar(40) | YES | | NULL| | >> | username | varchar(20) | YES | | NULL| | >> | email| varchar(20) | YES | | NULL| | >> | office | char(3) | YES | | NULL | | >&

Re: Adding Fields To Table

2009-10-01 Thread Martijn Tonies
3) | YES | | NULL| | +--+-+--+-+-+---+ 4 rows in set (0.00 sec) My question is if I would like to add addition fields like 'title' & 'phone number', how can I modify the table fields entry to add more fields? Thanks for any help! The manual has a section on how to create and m

Re: Adding Fields To Table

2009-09-30 Thread Robert Citek
If you are very new, you may want to go through the tutorial at w3shools: http://www.w3schools.com/SQl/default.asp Regards, - Robert On Wed, Sep 30, 2009 at 11:45 AM, Carlos Williams wrote: > I am no doubt very new to MySQL and have been studying the on line > manual however I find it a bit com

Re: Adding Fields To Table

2009-09-30 Thread Carlos Williams
On Wed, Sep 30, 2009 at 1:11 PM, mos wrote: > Carlos, >    Get a free copy of SqlYog (Community edition). > http://code.google.com/p/sqlyog/ Thanks but I don't have any GUI's installed on my machine I manage the database on or from. I am also trying to learn in case things break and I only have

Re: Adding Fields To Table

2009-09-30 Thread mos
ar(20) | YES | | NULL| | | office | char(3) | YES | | NULL| | +--+-+--+-+-+---+ 4 rows in set (0.00 sec) My question is if I would like to add addition fields like 'title' & 'phone number', how can

Re: Adding Fields To Table

2009-09-30 Thread Jo�o C�ndido de Souza Neto
archar(40) | YES | | NULL| | > | username | varchar(20) | YES | | NULL| | > | email| varchar(20) | YES | | NULL| | > | office | char(3) | YES | | NULL| | > +--+-+--+-+-+---+ > 4 rows in set

Adding Fields To Table

2009-09-30 Thread Carlos Williams
---+---+ 4 rows in set (0.00 sec) My question is if I would like to add addition fields like 'title' & 'phone number', how can I modify the table fields entry to add more fields? Thanks for any help! -- MySQL General Mailing List For list archives: ht

Re: need help with relational tables/fields

2009-09-03 Thread Wolfgang Schaefer
AndrewJames schrieb: > Hey, > > i have a table called users which has my users in it, each have a uid > field. > I also have a stories table which has stories in it each with a sid field > for each story but also a uid field so i know which user the story > belongs > to. > > i want to write a que

Re: need help with relational tables/fields

2009-09-03 Thread Wolfgang Schaefer
AndrewJames schrieb: > Hey, > > i have a table called users which has my users in it, each have a uid > field. > I also have a stories table which has stories in it each with a sid field > for each story but also a uid field so i know which user the story > belongs > to. > > i want to write a quer

Re: need help with relational tables/fields

2009-09-03 Thread Wolfgang Schaefer
AndrewJames schrieb: > Hey, > > i have a table called users which has my users in it, each have a uid > field. > I also have a stories table which has stories in it each with a sid field > for each story but also a uid field so i know which user the story > belongs > to. > > i want to write a quer

need help with relational tables/fields

2009-09-03 Thread AndrewJames
Hey, i have a table called users which has my users in it, each have a uid field. I also have a stories table which has stories in it each with a sid field for each story but also a uid field so i know which user the story belongs to. i want to write a query that will display the story depending

Re: [PHP] How to deal with identical fields in db

2009-05-05 Thread PJ
g of anthologies :-) > Well, that usually comes under editors and I have a couple of options where to enter that info: sub_title or description fields and I can always add a   for author first_name and Various or whatever for last_name :-) > > >>> Anyone for tea? >>&

RE: Re-arranging fields

2008-07-31 Thread Jerry Schwartz
>-Original Message- >From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED] >Sent: Thursday, July 31, 2008 10:54 AM >To: Jerry Schwartz >Cc: 'Ranjeet Walunj'; mysql@lists.mysql.com >Subject: RE: Re-arranging fields > >On Thu, 2008-07-31 at 10:24 -0400, Jerry

RE: Re-arranging fields

2008-07-31 Thread Jerry Schwartz
>-Original Message- >From: Martijn Tonies [mailto:[EMAIL PROTECTED] >Sent: Thursday, July 31, 2008 10:37 AM >To: mysql@lists.mysql.com >Subject: Re: Re-arranging fields > >> >> [JS] I added a dozen or so columns for a special purpose, and >although >

RE: Re-arranging fields

2008-07-31 Thread Mr. Shawn H. Corey
On Thu, 2008-07-31 at 10:24 -0400, Jerry Schwartz wrote: > [JS] Users will have read-only access through MS Access, and have to filter > on various fields. You're assuming that your users will never, ever be granted anything but read-access to only the data they suppose to have

Re: Re-arranging fields

2008-07-31 Thread Martijn Tonies
gt; > > >This is a security breach. Users should only have access thru > >pre-defined SQL statements. > > > [JS] Users will have read-only access through MS Access, and have to filter > on various fields. > > If we weren't trying to make our database designs some

RE: Re-arranging fields

2008-07-31 Thread Jerry Schwartz
>-Original Message- >From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED] >Sent: Thursday, July 31, 2008 10:02 AM >To: Jerry Schwartz >Cc: 'Ranjeet Walunj'; mysql@lists.mysql.com >Subject: RE: Re-arranging fields > >On Thu, 2008-07-31 at 09:56 -0400, Jerry S

RE: Re-arranging fields

2008-07-31 Thread Jerry Schwartz
>-Original Message- >From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED] >Sent: Wednesday, July 30, 2008 4:06 PM >To: Jerry Schwartz >Cc: mysql@lists.mysql.com >Subject: Re: Re-arranging fields > >On Wed, 2008-07-30 at 14:42 -0400, Jerry Schwartz wrote: >> Is

RE: Re-arranging fields

2008-07-31 Thread Jerry Schwartz
>-Original Message- >From: Rob Wultsch [mailto:[EMAIL PROTECTED] >Sent: Wednesday, July 30, 2008 3:56 PM >To: Jerry Schwartz >Cc: mysql@lists.mysql.com >Subject: Re: Re-arranging fields > >Something like >ALTER TABLE [TABLE] MODIFY [COLUMN] col_name column

RE: Re-arranging fields

2008-07-31 Thread Mr. Shawn H. Corey
On Thu, 2008-07-31 at 09:56 -0400, Jerry Schwartz wrote: > [JS] I added a dozen or so columns for a special purpose, and although MySQL > doesn't care I wanted them in a certain order that would be intuitive to a > user / programmer. Why is a user looking at your database? This is a security bre

RE: Re-arranging fields

2008-07-31 Thread Jerry Schwartz
>-Original Message- >From: Ranjeet Walunj [mailto:[EMAIL PROTECTED] >Sent: Wednesday, July 30, 2008 3:55 PM >To: Jerry Schwartz >Cc: mysql@lists.mysql.com >Subject: Re: Re-arranging fields > >Jerry Schwartz wrote: >> Is there any reasonable way of re-arran

Re: Re-arranging fields

2008-07-31 Thread Rob Wultsch
st I could come up with was to copy the >> table, empty it, and then do an INSERT . SELECT specifying the new order of >> the fields. > Something like > ALTER TABLE [TABLE] MODIFY [COLUMN] col_name column_definition > [FIRST | AFTER col_name] > shoudl work > > http://

Re: Re-arranging fields

2008-07-30 Thread Mr. Shawn H. Corey
of > the fields. According to RDB theory, the order of the columns is immaterially, just as is the order of the rows. You should always explicitly name the columns in the order you want. Relying on their default order can lead to problems down the road. -- Just my 0.0002 million dollars wo

Re: Re-arranging fields

2008-07-30 Thread Rob Wultsch
arranging the order of columns in a table > without losing their data? The best I could come up with was to copy the > table, empty it, and then do an INSERT . SELECT specifying the new order of > the fields. > > > > > > > > Regards, > > > > Jerry Schwar

Re: Re-arranging fields

2008-07-30 Thread Ranjeet Walunj
Jerry Schwartz wrote: Is there any reasonable way of re-arranging the order of columns in a table without losing their data? The best I could come up with was to copy the table, empty it, and then do an INSERT . SELECT specifying the new order of the fields. This can also be achieved in

Re-arranging fields

2008-07-30 Thread Jerry Schwartz
Is there any reasonable way of re-arranging the order of columns in a table without losing their data? The best I could come up with was to copy the table, empty it, and then do an INSERT . SELECT specifying the new order of the fields. Regards, Jerry Schwartz The Infoshop by Global

Weird, intermittent behavior: "SHOW FIELDS" queries taking 2 seconds!

2008-06-28 Thread Ben Sprecher
Hi folks - I've searched the web in vain to try to find anyone else with this problem. My computer will intermittently start having all "SHOW FIELDS" queries take 2 seconds. Not 1. Not 3. Always 2. The problem appears suddenly for no apparent reason - sometimes immediately after

RE: Importing - Adding Fields Into MySql From A List

2008-04-14 Thread Garris, Nicole
[mailto:[EMAIL PROTECTED] Sent: Monday, April 14, 2008 8:25 AM To: mysql@lists.mysql.com Subject: Importing - Adding Fields Into MySql From A List Newbie question! I have a list of field names from another database (not mysql) - like: name phone1 phone2 street city state zip info etc (a bunch

Importing - Adding Fields Into MySql From A List

2008-04-14 Thread revDAVE
Newbie question! I have a list of field names from another database (not mysql) - like: name phone1 phone2 street city state zip info etc (a bunch more fields) Q: Is there a way I can add these to an existing empty/blank table? Maybe I can use: - phpMyAdmin ? - sql commands with php

Re: Recent change in behaviour when inserting into NOT NULL fields??

2008-04-07 Thread Ed W
Baron Schwartz wrote: Hi Ed, On Thu, Apr 3, 2008 at 3:32 PM, Ed W <[EMAIL PROTECTED]> wrote: Hi Up until version 5.0.44 (on linux) it appeared that you could do stuff like deliberately insert a NULL into a NOT NULL varchar field and it would be silently converted to an empty string. Simil

Re: Recent change in behaviour when inserting into NOT NULL fields??

2008-04-06 Thread Baron Schwartz
Hi Ed, On Thu, Apr 3, 2008 at 3:32 PM, Ed W <[EMAIL PROTECTED]> wrote: > Hi > > Up until version 5.0.44 (on linux) it appeared that you could do stuff like > deliberately insert a NULL into a NOT NULL varchar field and it would be > silently converted to an empty string. Similarly if you didn't

Recent change in behaviour when inserting into NOT NULL fields??

2008-04-03 Thread Ed W
Hi Up until version 5.0.44 (on linux) it appeared that you could do stuff like deliberately insert a NULL into a NOT NULL varchar field and it would be silently converted to an empty string. Similarly if you didn't specify a value it appeared to use what is describe in the docs as the "DEFAU

Re: integers fields and strings

2008-03-14 Thread Les Fletcher
Thanks for the link. That helps a lot. Rob Wultsch wrote: On Fri, Mar 14, 2008 at 12:04 PM, Les Fletcher <[EMAIL PROTECTED]> wrote: | Field | Type| Null | Key | Default | Extra | | intfield1 | smallint(6) | YES | | 0| | | intfield2 | smallint(6) | YES |

Re: integers fields and strings

2008-03-14 Thread Rob Wultsch
On Fri, Mar 14, 2008 at 12:04 PM, Les Fletcher <[EMAIL PROTECTED]> wrote: > | Field | Type| Null | Key | Default | Extra | > | intfield1 | smallint(6) | YES | | 0| | > | intfield2 | smallint(6) | YES | | NULL| | > | intfield3 | smallint(6) | YES |

integers fields and strings

2008-03-14 Thread Les Fletcher
I am having some issues with some integer fields and string input. The table setup is the following: | Field | Type| Null | Key | Default | Extra | | intfield1 | smallint(6) | YES | | 0| | | intfield2 | smallint(6) | YES | | NULL| | | intfield3

Re: generating numbers from other fields

2008-01-18 Thread Sebastian Mendel
Brian E Boothe schrieb: how can i join three fields Values into one field? so in three select boxes i have date : Projects type 1 - 7 and project type 1 - 6 so the third Filed would be 116200824 generated by the other three fields? please clarify! or did you mean CONCAT() or CONCAT_WS

generating numbers from other fields

2008-01-17 Thread Brian E Boothe
how can i join three fields Values into one field? so in three select boxes i have date : Projects type 1 - 7 and project type 1 - 6 so the third Filed would be 116200824 generated by the other three fields? thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com

Mysql 4.0 Adding fields to large tables

2007-12-31 Thread James Sherwood
Hello all, I am trying to add a field to a very large table. The problem is that mysql locks up when trying to do so. I even tried deleting the foreign keys on the table and it wont even let me do that, again locking up. It works for around 5 minutes or so then just either locks or the data

mysql client command \G and blob fields

2007-11-27 Thread dpgirago
I've been experimenting with storing image data in blob fields, and I was surprised that using the mysql client to select the field with a semi-colon query terminator resulted in the binary data being dumped to the terminal (with lots of beeping) while using the \G query terminator result

Re: Not showing repeating fields.

2007-11-06 Thread Jamessketch
;> boat plane car car. >> How can I have it in a way where repeating ones will NOT be shown? So I >> would have written just car boat plane. >> >> Thank you in advance. >> James >> -- >> View this message in context: >> http://www.nabble.com/Not-showin

Re: Not showing repeating fields.

2007-11-05 Thread Ravi Kumar.
ar boat plane. > > Thank you in advance. > James > -- > View this message in context: > http://www.nabble.com/Not-showing-repeating-fields.-tf4755269.html#a13598356 > Sent from the MySQL - General mailing list archive at Nabble.com. > > > -- > MySQL General Mailing List

Not showing repeating fields.

2007-11-05 Thread Jamessketch
car boat plane car car. How can I have it in a way where repeating ones will NOT be shown? So I would have written just car boat plane. Thank you in advance. James -- View this message in context: http://www.nabble.com/Not-showing-repeating-fields.-tf4755269.html#a13598356 Sent from the MySQL

Re: Limiting the text size on text fields

2007-10-18 Thread Ganesh's screen
h) > VARCHAR(length) > BINARY(length) > VARBINARY(length) > > -- > Sebastian > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] > > > -- View this messag

Re: Limiting the text size on text fields

2007-10-18 Thread Sebastian Mendel
Ganesh's screen schrieb: > Is there a way to restrict the length of text field in MySQL. For example, it > is of 65K limit and could hold more than 2 characters. Is there a way to > restrict that to 4000 characters at table/field level. Coz the > max_allowed_packet constrainted the entire DB.

Limiting the text size on text fields

2007-10-15 Thread Ganesh's screen
message in context: http://www.nabble.com/Limiting-the-text-size-on-text-fields-tf4627867.html#a13213842 Sent from the MySQL - General mailing list archive at Nabble.com. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL

Re: Editing fields in bulk

2007-09-05 Thread Martijn Tonies
> I have a column where I need to replace all instances of the text "US- > Complete" (contained within a long sentence) with "US Complete". > There are probably 50 or 100 of them. I'm really scared to do it > since I can't risk screwing up that column - what's the correct syntax? When you s

Re: Editing fields in bulk

2007-09-04 Thread Baron Schwartz
Brian Dunning wrote: I have a column where I need to replace all instances of the text "US-Complete" (contained within a long sentence) with "US Complete". There are probably 50 or 100 of them. I'm really scared to do it since I can't risk screwing up that column - what's the correct syntax?

Re: Editing fields in bulk

2007-09-04 Thread Gary Josack
Brian Dunning wrote: I have a column where I need to replace all instances of the text "US-Complete" (contained within a long sentence) with "US Complete". There are probably 50 or 100 of them. I'm really scared to do it since I can't risk screwing up that column - what's the correct syntax?

RE: Editing fields in bulk

2007-09-04 Thread Hartleigh Burton
7;) WHERE `fieldname` LIKE '%US- Complete%'; -Original Message- From: Brian Dunning [mailto:[EMAIL PROTECTED] Sent: Wednesday, 5 September 2007 10:42 AM To: mysql@lists.mysql.com Subject: Editing fields in bulk I have a column where I need to replace all instances of the t

Editing fields in bulk

2007-09-04 Thread Brian Dunning
I have a column where I need to replace all instances of the text "US- Complete" (contained within a long sentence) with "US Complete". There are probably 50 or 100 of them. I'm really scared to do it since I can't risk screwing up that column - what's the correct syntax? -- MySQL General Ma

Re: Figuring out the difference in value between 2 fields

2007-06-06 Thread Baron Schwartz
| a-b | +--+ | 18446744073709551516 | +--+ 1 row in set (0.00 sec) Dan Buettner wrote: If they're both numeric fields, then it's as easy as: SELECT field1-field2 AS difference FROM table; and if you always want a positive number: SELECT ABS(f

Re: Figuring out the difference in value between 2 fields

2007-06-06 Thread Peter Bradley
Ysgrifennodd Jason Pruim: Okay, so I have been gooling all over trying to figure this out. I'm sure it's easy enough to do, but I can't seem to find it. All I want to do is figure out the difference between 2 fields. IE: Field 1= 20 Field 2 =10 Difference between Field 1 &

Re: Figuring out the difference in value between 2 fields

2007-06-06 Thread Dan Buettner
If they're both numeric fields, then it's as easy as: SELECT field1-field2 AS difference FROM table; and if you always want a positive number: SELECT ABS(field1-field2) AS difference FROM table; HTH, Dan On 6/6/07, Jason Pruim <[EMAIL PROTECTED]> wrote: Okay, so I have been

RE: Figuring out the difference in value between 2 fields

2007-06-06 Thread Chris Boget
> Okay, so I have been gooling all over trying to > figure this out. I'm sure it's easy enough to do, > but I can't seem to find it. > All I want to do is figure out the difference between > 2 fields. IE: > Field 1= 20 > Field 2 =10 > Difference betwe

Figuring out the difference in value between 2 fields

2007-06-06 Thread Jason Pruim
Okay, so I have been gooling all over trying to figure this out. I'm sure it's easy enough to do, but I can't seem to find it. All I want to do is figure out the difference between 2 fields. IE: Field 1= 20 Field 2 =10 Difference between Field 1 & 2 is: 10 Any ideas?

auto incrementing fields

2007-05-24 Thread Ronan McGlue
... What i need to do is to increment all current values of theose fields by one for my existing data, and to change the structure of those tables to have the default value to be 0. Am i correct in this assumption!? So i need to schedule some downtime, increment all fields and change the

RE: Fields seem to be mis-wired (for lack of a better term)

2007-04-24 Thread Chris W. Parker
On Tuesday, April 24, 2007 10:12 AM Jim Winstead said: >> AND `type` = 0 >> AND `manager_id` = 0 >> AND `modified` = NOW() >> WHERE `id` = 5 > > you can't use 'AND' to connect your updates, you need to use commas: > > UPDATE users SET name = 'First Las

Re: Fields seem to be mis-wired (for lack of a better term)

2007-04-24 Thread Jim Winstead
On Tue, Apr 24, 2007 at 10:03:58AM -0700, Chris W. Parker wrote: > UPDATE `users` > SET `name` = 'First Last' > AND `email` = '[EMAIL PROTECTED]' > AND `balance` = 0 > AND `accrual` = 14400 > AND `is_manager` = 1 > AND `is_superadmin` = 1 > AND `type` = 0 >

Fields seem to be mis-wired (for lack of a better term)

2007-04-24 Thread Chris W. Parker
Hello, I'm having a problem when trying to update a record. I'm trying to set a field called 'balance' to 0 but instead of 'balance' becoming 0 the field 'name' becomes 0. None of the other columns are updated incorrectly. Here's the SQL statement I'm using: UPDATE `users` SET `name` = 'First

Re: more than 10000 fields in the OR clause

2007-04-17 Thread Arun Kumar PG
great. thx! On 4/17/07, Daniel Kasak <[EMAIL PROTECTED]> wrote: Arun Kumar PG wrote: > Guys, > > I know this is a stupid thing but I wanted to know if we have an index > on a > column "X" and if i have a query having 1 OR conditions on the > field e.g. > where X=10 OR x=12 OR x=13 OR x=15.

Re: more than 10000 fields in the OR clause

2007-04-16 Thread Daniel Kasak
Arun Kumar PG wrote: Guys, I know this is a stupid thing but I wanted to know if we have an index on a column "X" and if i have a query having 1 OR conditions on the field e.g. where X=10 OR x=12 OR x=13 OR x=15.. so on then will it give any benefits in terms of speed? Yes the inde

Re: more than 10000 fields in the OR clause

2007-04-16 Thread Ananda Kumar
Hi Arun, Instead of doing x=10 or x=10, use the IN condition where X in (10,20,30..etc), it would work better. But i guess there is a limit on the number of values specified in IN clause, I am not sure, need to check on that. regards anandkl On 4/17/07, Arun Kumar PG <[EMAIL PROTECTED]> wrote:

more than 10000 fields in the OR clause

2007-04-16 Thread Arun Kumar PG
Guys, I know this is a stupid thing but I wanted to know if we have an index on a column "X" and if i have a query having 1 OR conditions on the field e.g. where X=10 OR x=12 OR x=13 OR x=15.. so on then will it give any benefits in terms of speed? thx - A

converting TEXT fields between charsets doesn't work

2007-04-04 Thread Nico Sabbi
Hi, I followed the instructions to change columns values from an encoding another (in my case from latin1 to utf8), but the operation simply failed. The manual reads http://dev.mysql.com/doc/refman/5.0/en/alter-table.html : " If you want to change the table default character set and all ch

Clearing values from some fields in some rows

2007-02-27 Thread boclair
MySql 4.1.21 ISAM table The table has a many fields and a number of rows with auto-incremented ID I need to set the value in particular fields for some rows to NULL. Is there a simpler way of doing this than by setting the value for each of the particular fields to NULL using an UPDATE

Re: [Fwd: search issue] mysqlimport problem with , inside fields

2007-02-19 Thread Michael Raven
- View this message in context: http://www.nabble.com/mysqlimport-problem-with-%2C-inside-fields-tf3249141.html#a9055104 Sent from the MySQL - General mailing list archive at Nabble.com. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: mysqlimport problem with , inside fields

2007-02-18 Thread Anoop kumar V
Hey Scott - I dont think you can use , with mysqlimport as a field separator if it is part of the data. use something else - I used the pipe | character... This is what worked for me: C:\>mysqlimport --fields-enclosed-by=""" --fields-terminated-by=| --lines-terminated-by=&qu

mysqlimport problem with , inside fields

2007-02-18 Thread Scott Hamm
I've been trying to import fields that contains the comma character ',' inside double quotes '"', with the results following: mysqlimport --fields-optionally-enclosed-by=""" --fields-terminated-by=, --lines-terminated-by="\r\n" --ignore

Re: select on multiple fields in several tables?

2007-02-05 Thread Brent Baisley
You can also use the following syntax if you want to pull all the fields from only certain tables: SELECT table1.*,table2.*,table3.field1,table3.field2 FROM table1, table2, table3 ... - Original Message - From: "Ryan Stille" <[EMAIL PROTECTED]> To: Sent: Sunday, Febr

Re: select on multiple fields in several tables?

2007-02-04 Thread ViSolve DB Team
smith" or d.ename="johnsmith"; Thanks ViSolve DB Team. - Original Message - From: "boll" <[EMAIL PROTECTED]> To: "MySQL General Mailing List" Sent: Sunday, February 04, 2007 10:06 PM Subject: select on multiple fields in several tables? Hello- I

Re: select on multiple fields in several tables?

2007-02-04 Thread boll
rying to avoid doing separate selects on each column in each table. This is using MySQL 5.0.27 . Thanks for any suggestion or alternative methods! -John SELECT * FROM table1, table2, table3 WHERE table1.name = 'john smith' AND table2.city = 'Dallas' If the tables have fiel

Re: select on multiple fields in several tables?

2007-02-04 Thread Ryan Stille
eparate selects on each column in each table. This is using MySQL 5.0.27 . Thanks for any suggestion or alternative methods! -John SELECT * FROM table1, table2, table3 WHERE table1.name = 'john smith' AND table2.city = 'Dallas' If the tables have fields named the sam

select on multiple fields in several tables?

2007-02-04 Thread boll
Hello- I'm working with an unfamiliar application, trying to figure out where my data is going. Is it possible to form a query to select from all the columns in several tables at once? Something equivalent to: SELECT FROM * WHERE * = 'john smith'; If that's not possible I'd still like to

Re: Prefixing fields with table name when joining?

2006-12-11 Thread Visolve DB Team
Hi Kelly, The short script of prefixing fields with tablename till 5.0 and beta is not applicable. Hope, this senario would be rare, that too many tables with larger field length, more columns etc. Thanks ViSolve DB Team - Original Message - From: "Kelly Jones" <[EM

Prefixing fields with table name when joining?

2006-12-11 Thread Kelly Jones
I have three tables (x, y, and z) with the same 3 fields (id, name, number). If I do: SELECT * FROM x, y, z WHERE ... each row of my result will contain 3 id fields, 3 name fields, and 3 number fields. Of course, I can/should do: SELECT x.id AS x_id, x.name AS x_name, x.number AS x_number

  1   2   3   4   5   6   7   8   9   10   >