I did the following test:
My program still uses MySQL 5.7 libmysqlclient.so, but I connect now to a
5.6.16 server.
And the SQL interrupt works fine... so I suspect there is a MySQL server issue
in 5.7.
Seb
On 07/12/2016 01:01 PM, Sebastien FLAESCH wrote:
About:
> B) For some reason, the p
About:
> B) For some reason, the program does not want to exit() - (must investigate)
In fact we use prepared statements with a sequence of mysql_stmt_init,
mysql_stmt_prepare, mysql_stmt_execute, mysql_stmt_fetch, ... and
mysql_stmt_close.
After the statement was interrupted, we try to free th
Hi all,
I use the following technique to cancel a long running query:
In the SIGINT signal handler, I restart a connection and I perform a
KILL QUERY mysql-process-id-of-running-query
This was working find with MySQL 5.6.
But with 5.7 (5.7.11), we get now a different result:
A) The query
Hi,
Thanks for your replies.
In our case, we can't implement NOSQL solution. Thats requires modify/check
all our application and all services (Including FreeRADIUS that I'm not
sure if it's compatible).
Andrew, I have heard about people that has a lot of data, more than me. I
know that MySQL su
What kind of queries is this table serving? 8GB is not a huge amount of
data at all and IMO it's not enough to warrant sharding.
On Thu, May 15, 2014 at 1:26 PM, Antonio Fernández Pérez <
antoniofernan...@fabergroup.es> wrote:
>
>
>
> Hi,
>
> I have in my server database some tables that ar
2014-05-19 11:49 GMT+02:00 Johan De Meersman :
>
> - Original Message -
> > From: "Manuel Arostegui"
> > Subject: Re: Big innodb tables, how can I work with them?
> >
> > noSQL/table sharding/partitioning/archiving.
>
> I keep wondering how
- Original Message -
> From: "Manuel Arostegui"
> Subject: Re: Big innodb tables, how can I work with them?
>
> noSQL/table sharding/partitioning/archiving.
I keep wondering how people believe that NoSQL solutions magically don't need
RAM to work. Nearly
2014-05-15 14:26 GMT+02:00 Antonio Fernández Pérez <
antoniofernan...@fabergroup.es>:
>
>
>
> Hi,
>
> I have in my server database some tables that are too much big and produce
> some slow query, even with correct indexes created.
>
> For my application, it's necessary to have all the data be
date, total minutes
connected for that date, total number of connections for that day, ... )
then you have reduced how much work your weekly report needs to do from
7 rows to just 7. How much faster would that be?
Each day, you add the previous day's totals to your summary tables.
- Original Message -
> From: "Antonio Fernández Pérez"
> Subject: Advices for work with big tables
>
> Hi,
>
> I write to the list because I need your advices.
>
> I'm working with a database with some tables that have a lot of rows, for
&g
s table?
>
> My server works with disk cabin and I think that sharding and partitioning
> are technologies that not applies. Work with a lot of data produces that
> there are some slow query, even with the correct indexes created.
>
> So, one option is to delete data but, I
oning
are technologies that not applies. Work with a lot of data produces that
there are some slow query, even with the correct indexes created.
So, one option is to delete data but, I use a RADIUS system to authenticate
and authorize users to connect to Internet. For this reason I need work
with a
Am 15.05.2014 14:26, schrieb Antonio Fernández Pérez:
> I have in my server database some tables that are too much big and produce
> some slow query, even with correct indexes created.
>
> For my application, it's necessary to have all the data because we make an
> authentication process with RA
Hi,
I have in my server database some tables that are too much big and produce
some slow query, even with correct indexes created.
For my application, it's necessary to have all the data because we make an
authentication process with RADIUS users (AAA protocol) to determine if one
user can
,test.z_import_prices_mdk,test.z_import_prices_sku,test.z_import_translations,test.z_import_translations_model
--recursion-method dsn=h=localhost,D=percona,t=dsns --user=percona
--password=percona --nocheck-replication-filters --databases=test,mysql
localhost
But it does not work, for example table
when I :
show databases;
I got:
++
| Database |
++
| information_schema |
| Applications |
| Developer |
| Library|
| System |
| bin|
| cores |
| etc|
| private
Am 08.03.2013 17:32, schrieb frederic nivor:
> when I :
> show databases;
> I got:
> ++
> | Database |
> ++
> | information_schema |
> | Applications |
> | Developer |
> | Library|
> | System |
> | bin
I've just installed the mysql, and its default database (mysql and
performance_schema), so I connect with:
mysql -u root
Initialy there is not password.
and when I :
show grants for 'root'@'localhost';
I got :
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
GRANT PROXY ON ''@''
Am 08.03.2013 15:53, schrieb frederic nivor:
> I use mysql-5.6.10 on a cross-platform.
> when I :
> use mysql;
> I got :
> ERROR 1049 (42000): Unknown database 'mysql'
> but when I :
> select User,Host,Password from mysql.user;
> I got the right results.
> Did I do something wrong in configurati
I have an application for which data is being written to many disks
simultaneously. I would like to use a MySQL table space on each disk.
If one of the disks crashes it is tolerable to lose that data, however,
I must continue to write to the other disks.My specific concerns are
around the r
On 04/26/11 05:32, Halász Sándor wrote:
2011/04/25 18:45 +, Larry McGhaw
CREATE VIEW `myview2` AS
SELECT a.*, IF(b.`Name` IS NULL, '', b.`Name`) AS `TypeName`
FROM `mytable` a
LEFT JOIN `types` b ON a.`Type` = b.`ID`;
Well, for this construct
IF(b.`N
2011/04/25 18:45 +, Larry McGhaw
CREATE VIEW `myview2` AS
SELECT a.*, IF(b.`Name` IS NULL, '', b.`Name`) AS `TypeName`
FROM `mytable` a
LEFT JOIN `types` b ON a.`Type` = b.`ID`;
Well, for this construct
IF(b.`Name` IS NULL, '', b.`Name`)
there is a spe
Hi,
On 04/25/11 20:45, Larry McGhaw wrote:
My best advice is to not use a custom MySQL function in a view when the
parameter to that function
is a column or expression that has the potential to result in NULL because of
being on the right side
of a left outer join (or the left side of a right
11 2:03 PM
To: Larry McGhaw
Cc: Daevid Vincent; mysql@lists.mysql.com
Subject: Re: WHERE does not work on calculated view field - Found word(s) list
error in the Text body
On 04/22/11 22:41, Larry McGhaw wrote:
> It does appear to be some type of bug to me.
Hm... do you have an idea how to wo
On 04/22/11 22:41, Larry McGhaw wrote:
It does appear to be some type of bug to me.
Hm... do you have an idea how to work around this bug then?
Yours,
Daniel
Clearly from the select, the Typename field is not null, as shown here.
mysql> SELECT *, TypeName Is NULL, TypeName IS NOT N
Hi,
thanks for the answer!
On 04/23/11 11:33, ars k wrote:
Could you check the 'myview' once again? I think you thought to create the
view as follows:
" CREATE VIEW `myview2` AS SELECT a.*, EMPTY_STRING(b.`Name`) AS
`TypeName`FROM `mytable` a LEFT JOIN `types` b ON *a.ID* *= b.`ID`*;
Hi Daniel,
Could you check the 'myview' once again? I think you thought to create the
view as follows:
" CREATE VIEW `myview2` AS SELECT a.*, EMPTY_STRING(b.`Name`) AS
`TypeName`FROM `mytable` a LEFT JOIN `types` b ON *a.ID* *= b.`ID`*;
"
Now your select queries will give results as fol
On 22.04.2011 22:41, Larry McGhaw wrote:
It does appear to be some type of bug to me.
I agree. I was thrown by Daniels "first and third" comment, which I
guess should read "second and third"
I reproduced the behavior in 5.1.53-community on Windows.
/ Carsten
--
MySQL General Mailing List
F
mysql@lists.mysql.com
Subject: Re: WHERE does not work on calculated view field - Found word(s) list
error in the Text body
Hi,
thanks for the fast reply!
On 04/22/11 21:39, Daevid Vincent wrote:
>> DROP DATABASE `test`;
>> CREATE DATABASE `test`;
>> USE `test`;
>>
>> CREATE
Hi Carsten,
On 04/22/11 22:11, Carsten Pedersen wrote:
On 22.04.2011 21:37, Daniel Kraft wrote:
DROP DATABASE `test`;
CREATE DATABASE `test`;
USE `test`;
CREATE TABLE `mytable`
(`ID` SERIAL,
`Type` INTEGER UNSIGNED NULL,
PRIMARY KEY (`ID`));
INSERT INTO `mytable` (`Type`) VALUES (NULL);
CREAT
On 22.04.2011 21:37, Daniel Kraft wrote:
Hi all,
I'm by no means a (My)SQL expert and just getting started working with
VIEWs and stored procedures, and now I'm puzzled by this behaviour:
DROP DATABASE `test`;
CREATE DATABASE `test`;
USE `test`;
CREATE TABLE `mytable`
(`ID` SERIAL,
`Type` INTE
Hi,
thanks for the fast reply!
On 04/22/11 21:39, Daevid Vincent wrote:
DROP DATABASE `test`;
CREATE DATABASE `test`;
USE `test`;
CREATE TABLE `mytable`
(`ID` SERIAL,
`Type` INTEGER UNSIGNED NULL,
PRIMARY KEY (`ID`));
INSERT INTO `mytable` (`Type`) VALUES (NULL);
CREATE TABLE `t
> -Original Message-
> From: Daniel Kraft [mailto:d...@domob.eu]
> Sent: Friday, April 22, 2011 12:37 PM
> To: mysql@lists.mysql.com
> Subject: WHERE does not work on calculated view field
>
> Hi all,
>
> I'm by no means a (My)SQL expert and just gett
Hi all,
I'm by no means a (My)SQL expert and just getting started working with
VIEWs and stored procedures, and now I'm puzzled by this behaviour:
DROP DATABASE `test`;
CREATE DATABASE `test`;
USE `test`;
CREATE TABLE `mytable`
(`ID` SERIAL,
`Type` INTEGER UNSIGNED NULL,
PRIMARY KEY (
>-Original Message-
>From: Carsten Pedersen [mailto:cars...@bitbybit.dk]
>Sent: Monday, January 03, 2011 1:48 PM
>To: Jerry Schwartz
>Cc: 'mos'; mysql@lists.mysql.com
>Subject: Re: mysqlimport doesn't work for me
>
>It's been a long time sine I
-+--++
4 rows in set (0.03 sec)
This does not work:
localhost>TRUNCATE t_dmu_history;
localhost>quit
C:\Users\Jerry\Documents\Access MySQL
Production>mysqlimport --columns=`dm_history_dm_id`,`dm_history_customer_i
3071 | 299522 |
+--+--++
4 rows in set (0.03 sec)
====
This does not work:
localhost >TRUNCATE t_dmu_history;
localhost >quit
C:\Users\Jerry\Documents\Access MySQL
Production>mysqlimport --columns=`dm_history_dm_id`,`dm_history_customer_id`
--fields-t
Hello MySQL-users list,
We are having an issue with replication and binlog files and I was hoping that
this list could shed a little light on the issue for us. We have a pair of
5.1.41-community MySQL servers. We attempted to restore from the slave server,
and in the process I zeroed out the my
Devart
Email: i...@devart.com
Web: http://www.devart.com
FOR IMMEDIATE RELEASE
CONTACT INFORMATION:
Julia Samarska
jul...@devart.com
27-Jul-2010
More Tools to Work with MySQL Databases in Visual Studio Provided by dbForge
Fusion!
Devart today releases dbForge Fusion for MySQL
Devart
Email: i...@devart.com
Web: http://www.devart.com
FOR IMMEDIATE RELEASE
CONTACT INFORMATION:
Julia Samarska
jul...@devart.com
12-Jul-10
More Tools to Work with MySQL Databases Provided by dbForge Studio!
With dbForge Studio for MySQL, Devart continues its initiative to produce
Is it normal behavior for MySQL command type ahead not to work unless
you have a database selected? I notice that using the tab 'type ahead'
has no response unless I use a specific database. Is this normal
behavior?
--
MySQL General Mailing List
For list archives: http://lists.mysql.co
Why in the world would you think "select * from table_name group by movid
having max(movid)" would work? It seems to compile without errors but
doesn't give you what you seem to want.
This would work:
select * from table_name group by movid having movid = (select max(movid)
:28:06 PM
Subject: Re: max() can't work
The max() function is an aggregate function which can be used in
conjunction with GROUP BY in the SELECT or HAVING clause:
http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html . This
code should work:
select * from table_name group by
Yes - you must use the subselect. Or, you can set a variable like:
select @max := max(movid) from table_name;
select * from table_name where movid = @max;
On Sat, Feb 6, 2010 at 8:34 AM, tech list wrote:
> select * from table_name where movid = max(movid);
>
> why the sql above c
The max() function is an aggregate function which can be used in
conjunction with GROUP BY in the SELECT or HAVING clause:
http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html . This
code should work:
select * from table_name group by movid having max(movid).
However, there is a
the field "movid" is type integer or varchar ?
2010/2/6 tech list
> select * from table_name where movid = max(movid);
>
> why the sql above can't work?
> Shall I use a sub-select instead?
>
> select * from table_name where movid = (select max(movid) fro
select * from table_name where movid = max(movid);
why the sql above can't work?
Shall I use a sub-select instead?
select * from table_name where movid = (select max(movid) from table_name) ?
Thanks in advance.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mys
it installed (including the
actual MySQL package, the startup package and the preference pane). However it
did not work right. The preference pane caused Preferences.app to crash
repeatedly, so I had to remove it.
mysql, mysqld and mysqladmin all return "bad CPU type in executable".
On Mon, Nov 23, 2009 at 7:37 AM, Johan De Meersman wrote:
> You don't even need to stop the server afaik. As mentioned previously,
> though, works for MyISAM only.
>
While this is strictly true there are some big caveats (flushing tables,
etc). It is safer to shut down the database before moving
ist in here, the whole statement will be applied to the
> system atomically
>
> The database has 1200+ tables, so your approach seems like more work to
> me. As it is, all I'm doing is:
>
> service mysql stop
> mv olddb newdb
> service mysql start
> mysqlcheck -o ne
Does this work if any of the tables are InnoDB?
On Mon, Nov 23, 2009 at 8:17 AM, Robinson, Eric wrote:
> >RENAME TABLE
> > olddb.table1 TO newdb.table1,
> > olddb.table2 TO newdb.table2
>
> >put the whole list in here, the whole statement will be applied to the
>RENAME TABLE
> olddb.table1 TO newdb.table1,
> olddb.table2 TO newdb.table2
>put the whole list in here, the whole statement will be applied to the
system atomically
The database has 1200+ tables, so your approach seems like more work to
me. As it is, all I'm doing is:
s
Safer and much less work:
since you have the luxury of stopping the server, stop it, restarting
with skip-networking and log in from a local console which should
guarantee that you are alone on the system.
RENAME TABLE
olddb.table1 TO newdb.table1,
olddb.table2 TO newdb.table2
put the
On Sat, Nov 21, 2009 at 2:43 PM, Robinson, Eric wrote:
> > DB engines that have their own data dictionary (Innodb, etc) in
> addition to
> > what is in the .frm could easily be messed up.
> Like I said, there are only MyISAM tables in the database, so would there
> be any risks associated with my
> DB engines that have their own data dictionary (Innodb, etc) in
addition to
> what is in the .frm could easily be messed up.
Like I said, there are only MyISAM tables in the database, so would
there be any risks associated with my simple approach?
(Also there are no stored procedures because
ng about lots of different ways to do a database
> rename, and people are making it sound like a complicated, dangerous
> procedure.
>
> Why would my simple approach not work? Should I be watching for
> potential problems down the road because I did it this way?
>
>
>
ause when I Google
it, I see people talking about lots of different ways to do a database
rename, and people are making it sound like a complicated, dangerous
procedure.
Why would my simple approach not work? Should I be watching for
potential problems down the road because I did it this way?
--
Er
AND r.prov=c.prov AND
r.cap=c.cap AND r.CodRappr=c.CodRappr;
Regards,
Gavin Towey
-Original Message-
From: Deviad [mailto:dev...@msn.com]
Sent: Monday, August 24, 2009 6:27 PM
To: mysql@lists.mysql.com
Subject: Re: Natural Join Issue: column names are equal but doesn't work anyway
;,'Lansing','MI','49224',1817.5,2000,'03');
> insert into clienti
> values
> ('522','Nelson','Mary','108Pine','Ada','MI','49441',98.75,1500,'12');
> insert into clienti
> values
> (
6Elm','Lansing','MI','49224',1817.5,2000,'03');
> insert into clienti
> values
> ('522','Nelson','Mary','108Pine','Ada','MI','49441',98.75,1500,'12');
> insert into clienti
> values
> (
75,1500,'12');
insert into clienti
values
('567','Dinh','Tran','808Ridge','Harper','MI','48421',402.4,750,'06');
insert into clienti
values
('587','Galvez','Mara','512
Hi List,
I have been trying to use bencher and chkfrag from
http://www.severalnines.com. But I continue to receive the following
errors../chkfrag: error while loading shared libraries:
/usr/local/mysql/lib/libndbclient.so.4: cannot restore segment prot
after reloc: permission denie
Works for me. I assume you're only trimming blanks from the beginning
and/or end of the string. I have found that it will not trim tabs. Try a
command like:
select concat("'", trim(notes), "'") from work_notes
On Fri, Apr 17, 2009 at 2:17 PM, Richard Reina wrote:
> Hello All,
>
> I can't ge
http://www.mydigitallife.info/2007/04/23/remove-or-trim-first-or-last-few-characters-in-mysql-database-with-sql/
Richard Reina wrote:
Hello All,
I can't get trim to trim the blank space from a TEXT field in the query below
and was wondering if someone could tell what I am doing wrong?
SELECT
Hello All,
I can't get trim to trim the blank space from a TEXT field in the query below
and was wondering if someone could tell what I am doing wrong?
SELECT TRIM(notes) FROM work_notes;
Thanks for any help as I am at a complete loss.
Richard
--
MySQL General Mailing List
For list archives:
out that, the Handler_read_rnd_next variable was
> zero in both cases.
>
> Before running each query, I ran "flush status", then the query, then "show
> session status like 'Handler%'". The first one had a value of 207 for
> "Handler_read_rnd_next&q
Baron Schwartz wrote:
Hi!
On Wed, Mar 11, 2009 at 8:20 PM, David M. Karr
wrote:
Using 5.0.67-0ubuntu6 on Ubuntu 8.10.
I'm going through the "High Performance MySQL" book. I was reading section
4.4.1.8, titled "MIN() and MAX()". The point of this is that MySQL doesn't
optimize MIN()/MAX()
Hi!
On Wed, Mar 11, 2009 at 8:20 PM, David M. Karr
wrote:
> Using 5.0.67-0ubuntu6 on Ubuntu 8.10.
>
> I'm going through the "High Performance MySQL" book. I was reading section
> 4.4.1.8, titled "MIN() and MAX()". The point of this is that MySQL doesn't
> optimize MIN()/MAX() very well, but it
Using 5.0.67-0ubuntu6 on Ubuntu 8.10.
I'm going through the "High Performance MySQL" book. I was reading
section 4.4.1.8, titled "MIN() and MAX()". The point of this is that
MySQL doesn't optimize MIN()/MAX() very well, but it showed a supposed
workaround for this.
The first sample query w
t; From: mat...@itlegion.ru
> To: mysql@lists.mysql.com
> Subject: Left join does not work with Count() as expected
>
> I have two simple tables. One - list of forums, second - list of
> messages and i want to
> get the list of forums with number of messages in each.
>
>SELECT forums.id , COUNT( forum_msg.id ) AS cnt
>FROM forums
>LEFT JOIN forum_msg ON forums.id = forum_msg.forum_id
>ORDER BY forums.sorder ASC
Missing GROUP BY.
PB
-
Artem Kuchin wrote:
I have two simple tables. One - list of forums, second - list of
messages and i want to
get the list
You need to group by forum_id...
On 2/19/09 11:09 AM, "Artem Kuchin" wrote:
> I have two simple tables. One - list of forums, second - list of
> messages and i want to
> get the list of forums with number of messages in each.
>
> Here is the query:
>
> SELECT forums.id , COUNT( forum_msg.id )
I have two simple tables. One - list of forums, second - list of
messages and i want to
get the list of forums with number of messages in each.
Here is the query:
SELECT forums.id , COUNT( forum_msg.id ) AS cnt
FROM forums
LEFT JOIN forum_msg ON forums.id = forum_msg.forum_id
ORDER BY forums.so
each element of the
> other table. It compounds the select statement.
> You may try a Union.Im new to Mysql so im not sure it will work, but you
> might try it out.
>
> SELECT *
> FROM sites
> INNER JOIN users ON sites.userid = users.ID
> WHERE sites.email = 'per...@d
endorse content contained within this transmission.
> Date: Sun, 1 Feb 2009 17:23:10 -0500
> Subject: Re: Trying to work out why a join query is so slow
> From: ysn...@gmail.com
> To: si...@internetstuff.ltd.uk
> CC: mysql@lists.mysql.com
>
> My guess is that the OR i
My guess is that the OR is searching the whole table for each element of the
other table. It compounds the select statement.
You may try a Union.Im new to Mysql so im not sure it will work, but you
might try it out.
SELECT *
FROM sites
INNER JOIN users ON sites.userid = users.ID
WHERE sites.email
Hi Everyone,
I'm trying to run a very simple query on two joined tables but it's taking a
long time to run.
I have two tables, users and sites, both of which have an email address field
that I'm querying.
here's my query:
SELECT *
FROM sites
INNER JOIN users ON sites.userid = users.ID
Has the user been GRANTed PRIVILEGES yet? Look here for how to do that:
http://dev.mysql.com/doc/refman/5.0/en/adding-users.html
Cheers...Fish
On Sat, Oct 4, 2008 at 12:36 PM, David Giragosian <[EMAIL PROTECTED]>wrote:
> On Sat, Oct 4, 2008 at 11:33 AM, Varuna Seneviratna <
> [EMAIL PROTECTE
On Sat, Oct 4, 2008 at 11:33 AM, Varuna Seneviratna <
[EMAIL PROTECTED]> wrote:
> What is the user account's password.I used the command
> C:\>mysql -u user -p
> Enter password: **
> ERROR 1045 (28000): Access denied for user 'user'@'localhost' (using
> password: Y
> ES)
> How can I find i
What is the user account's password.I used the command
C:\>mysql -u user -p
Enter password: **
ERROR 1045 (28000): Access denied for user 'user'@'localhost' (using
password: Y
ES)
How can I find it?
Varuna
PROTECTED]
> Sent: Tuesday, August 26, 2008 4:41 PM
> To: mysql
> Subject: alter merge table doesn't work as documented (?)
>
> I have a merge table and dropped one of the tables that was in the union.
> I
> then tried to alter the merge table to use only the
-
From: Jim Lyons [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 26, 2008 4:41 PM
To: mysql
Subject: alter merge table doesn't work as documented (?)
I have a merge table and dropped one of the tables that was in the union. I
then tried to alter the merge table to use only the remaining t
t3 (x int);
create table t_merge (x int) engine=merge union=(t1,t2,t3);
drop table t1;
alter table t_merge union=(t2, t3);
##
As I read the doc, this ought to work, leaving me with a merge table with
only 2 tables in the union. The output I got was (the error message is
Is there are a reason why this wouldn't work?
select upper( monarch.group_decode(lower(hg.alias)) ) from
nagios.nagios_hostgroups hg;
++
| upper( monarch.group_decode(lower(hg.alias)) ) |
++
| dat
p'' at line 1
Have tried 'BACKUP TABLE' but does not work either and documentation tells
it has been removed...
Any idea of what is going on? I've used and installed from sources MySQL
since version 3.xx so it is not an installation problem, tried the
'./configure --help&
ne
people saying do whatever you can using query in mysql rather then using
php. it's faster, better, more secure,...
thoughts?
-afan
Randall Price
Secure Enterprise Technology Initiatives
Microsoft Implementation Group
Virginia Tech Information Technology
1700 Pratt Drive
Blacksbu
+
There are no result as you said.
- Original Message -
From: "Afan Pasalic" <[EMAIL PROTECTED]>
To: "ewen fortune" <[EMAIL PROTECTED]>
Cc:
Sent: Thursday, May 15, 2008 12:52 AM
Subject: Re: CONCAT doesn't work with NULL?
> actuall
n', r.email)
FROM registrants r, addresses a
WHERE r.reg_id=121
if any of columns has value (e.g. title) NULL, I'll get as result 0
records.
If query doesn't have concat() - it works fine.
Why is that?
That's how CONCAT() is documented to work:
http://dev.mysql.com/doc/refm
On Wednesday 14 May 2008 18:52:20 Afan Pasalic wrote:
> actually, this will not work for me (or I got it wrong :D) because I
> need to have street, state and zip in one line and with separator
> defined on the beginning it will put everything in separate lines.
Use a 'space'
actually, this will not work for me (or I got it wrong :D) because I
need to have street, state and zip in one line and with separator
defined on the beginning it will put everything in separate lines.
:D
ewen fortune wrote:
Hi Afan,
You can use concat_ws
http://dev.mysql.com/doc/refman
addresses a
WHERE
r.reg_id=121
Randall Price
Secure Enterprise Technology Initiatives
Microsoft Implementation Group
Virginia Tech Information Technology
1700 Pratt Drive
Blacksburg, VA 24060
-Original Message-
From: Afan Pasalic [mailto:[EMAIL PROTECTED]
Sent: Wednesday,
Thanks Ewen,
that's what I was looking for!
:D
-afan
ewen fortune wrote:
Hi Afan,
You can use concat_ws
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat-ws
---
CONCAT() returns NULL if any argument is NULL.
CONCAT_WS() does not skip empty strings. However, it does
24060
-Original Message-
From: Afan Pasalic [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 14, 2008 11:53 AM
To: mysql@lists.mysql.com
Subject: CONCAT doesn't work with NULL?
hi,
I have query
SELECT CONCAT(r.first_name, ' ', r.last_name, '\n', r.organization,
On Wednesday 14 May 2008 18:02:42 Olexandr Melnyk wrote:
> It doesn't return no rows, it returns row(s) with a single column set to a
> NULL value. In case one of the arguments is NULL, CONCAT() will return
> NULL.
>
> To replace the value of one of the fields with an empty string when it's
> NULL,
Hi Afan,
You can use concat_ws
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat-ws
---
CONCAT() returns NULL if any argument is NULL.
CONCAT_WS() does not skip empty strings. However, it does skip any
NULL values after the separator argument
---
Ewen
On Wed, May 14, 2
It doesn't return no rows, it returns row(s) with a single column set to a
NULL value. In case one of the arguments is NULL, CONCAT() will return NULL.
To replace the value of one of the fields with an empty string when it's
NULL, you can use something like: CONCAT(COAESCE(a, ''), ' ', COAESCE(b,
hi,
I have query
SELECT CONCAT(r.first_name, ' ', r.last_name, '\n', r.organization,
'\n', r.title, '\n', a.address1, '\n', a.city, ', ', a.state, ' ',
a.zip, '\n', r.email)
FROM registrants r, addresses a
WHERE r.reg_id=121
if any of columns has value (e.g. title) NULL, I'll get as result 0
1
2 3
3 1
3 2
Again, foo.phone is shown for explanation only.
(This is the same for 'NOT', '!=', or '<>'.)
Correct.
The amount of work should be identical in both cases: grab a row, look
up by primary k
> I would have thought your not = though is matching a lot more rows every
> time..
The field is UNIQUE PRIMARY KEY in both tables, so there
should be 0 or 1 matches.
> I would look into using where not exists as a subselect
My MySQL book (O'Reilly second edition) does not mention
subqueries or
| 10 |
> > NULL | 3855468 | Using where; Using index |
> >
> > ++-+---+---+---+-
> +-+--+-+--+
> > 2 rows in set (0.00 sec)
> >
> > (This is the same for 'NOT
1 - 100 of 947 matches
Mail list logo