On Feb 12, 2014, at 6:30 PM, Larry Martell wrote:
Try adding a having clause, e.g.:
SELECT `ip`,`page`,`url`,`time_stamp`
FROM `ip_addresses`
WHERE (`time_stamp` BETWEEN date_add( CURDATE(), INTERVAL -1 DAY ) AND
CURDATE() - INTERVAL 1 SECOND)
AND TRIM(`referrer`) LIKE ''
HAVING
Hi Jennifer,
please try filtering with a subquery that locates ip addresses with more than 1
attempt:
SELECT ip, page, url, time_stamp
FROM ip_adresses
WHERE existing where clause AND
ip IN (SELECT ip
FROM ip_addresses
WHERE existing where clause
On Feb 17, 2014, at 10:17 AM, Roy Lyseng wrote:
please try filtering with a subquery that locates ip addresses with more than
1 attempt:
Hi Roy,
That did it! Thank you so much!!! Now I just need to study that IN
clause to see what's going on there.
If this is too slow, you may
Hi Jennifer,
great that it worked.
Try replacing the line
`ip` IN (temp_ip)
with
`ip` IN (SELECT ip FROM temp_ip)
Each subquery needs to be a complete SELECT query.
Thanks,
Roy
On 17.02.14 21:11, Jennifer wrote:
On Feb 17, 2014, at 10:17 AM, Roy Lyseng wrote:
please try filtering
Hi Jennifer,
On 2/17/2014 3:11 PM, Jennifer wrote:
CREATE TEMPORARY TABLE temp_ip AS
(SELECT `ip`
FROM `ip_addresses`
WHERE (`time_stamp` BETWEEN date_add( CURDATE(), INTERVAL -1 DAY ) AND
CURDATE() - INTERVAL 1 SECOND)
AND TRIM(`referrer`) LIKE ''
GROUP BY `ip`
HAVING
a
complete SELECT statement from before, that was good enough, but no. There's
always something new to learn!
Thanks again,
Jenni
Superior Shelving Systems
The (Storage|Office|Display|Warehouse) Shelving Specialists
Since 1984
Metro Shelving:
http
Hello,
I have the following SQL statement that I'd like to add to. It's used
to create a report that's emailed to me showing hits to our site that didn't
provide a referrer. However, I only want to report on multiple hits from the
same IP address - not just a single hit by someone.
On Wed, Feb 12, 2014 at 7:35 PM, Jennifer jenni...@superiorshelving.com wrote:
Hello,
I have the following SQL statement that I'd like to add to. It's
used to create a report that's emailed to me showing hits to our site that
didn't provide a referrer. However, I only want to
2013/02/02 12:58 -0600, Peter Brawley
On 2013-02-01 10:18 PM, h...@tbbs.net wrote:
2013/01/31 22:24 -0600, Peter Brawley
Is this what you mean?
Select,
pricelist
If( !IsNull(specialprice) And specialprice unitprice And CurDate() Between
startingDate And endingDate,
specialprice,
unitprice
)
2013/01/31 22:24 -0600, Peter Brawley
Is this what you mean?
Select,
pricelist
If( !IsNull(specialprice) And specialprice unitprice And CurDate() Between
startingDate And endingDate,
specialprice,
unitprice
) as used_price
From catalog
Where itemid='WB314';
PB
Maybe this is gilding the
On 2013-02-01 10:18 PM, h...@tbbs.net wrote:
2013/01/31 22:24 -0600, Peter Brawley
Is this what you mean?
Select,
pricelist
If( !IsNull(specialprice) And specialprice unitprice And CurDate() Between
startingDate And endingDate,
specialprice,
unitprice
) as used_price
From catalog
Where
Hello,
I'm trying to write a select query that grabs two prices from my db and
displays them on a web page. I want it to grab the `listprice`, and either the
`unitprice` or the `specialprice` depending on the following criteria:
if the `specialprice` is not empty,
AND it's less than
On 2013-01-31 8:13 PM, Angela Barone wrote:
Hello,
I'm trying to write a select query that grabs two prices from my db and
displays them on a web page. I want it to grab the `listprice`, and either the
`unitprice` or the `specialprice` depending on the following criteria:
if the
-Original Message-
From: LAMP [mailto:l...@afan.net]
Sent: Sunday, January 09, 2011 9:46 PM
To: mysql@lists.mysql.com
Subject: Re: export result from select statement
maybe it's clear to other but it's pretty unclear.
#mysql -username -p select * from table_name where id=123
'/home/me
-Original Message-
From: Michael Dykman [mailto:mdyk...@gmail.com]
Sent: Sunday, January 09, 2011 3:02 PM
To: LAMP; mysql@lists.mysql.com
Subject: Re: export result from select statement
I second Jerry's recommendation. It always works like a charm for me.
[JS] Thanks.
By the way
: 860.674.8341
E-mail: je...@gii.co.jp
Web site: www.the-infoshop.com
-Original Message-
From: LAMP [mailto:l...@afan.net]
Sent: Saturday, January 08, 2011 6:05 PM
To: mysql@lists.mysql.com
Subject: export result from select statement
Hi guys,
I wonder how to store to csv or txt file result from
: Saturday, January 08, 2011 6:05 PM
To: mysql@lists.mysql.com
Subject: export result from select statement
Hi guys,
I wonder how to store to csv or txt file result from SELECT query?
not a whole table nor database. Just results from SELECT query.
Usually I use MySQL Query Browser and Export feature
Eric Bergen wrote:
select into outfile is the correct way. What do you mean by doesn't
work? Does it give you an error?
It was an issue with permissions :-)
Thanks
On Sat, Jan 8, 2011 at 3:04 PM, LAMP l...@afan.net wrote:
Hi guys,
I wonder how to store to csv or txt file result from
[mailto:l...@afan.net]
Sent: Saturday, January 08, 2011 6:05 PM
To: mysql@lists.mysql.com
Subject: export result from select statement
Hi guys,
I wonder how to store to csv or txt file result from SELECT query?
not a whole table nor database. Just results from SELECT query.
Usually I use MySQL Query
.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
E-mail: je...@gii.co.jp
Web site: www.the-infoshop.com
-Original Message-
From: LAMP [mailto:l...@afan.net]
Sent: Saturday, January 08, 2011 6:05 PM
To: mysql@lists.mysql.com
Subject: export result from select statement
Hi
Hi guys,
I wonder how to store to csv or txt file result from SELECT query?
not a whole table nor database. Just results from SELECT query.
Usually I use MySQL Query Browser and Export feature, but in this
case I don't have access with MySQL Query Browser. Though, I have a
command line
select into outfile is the correct way. What do you mean by doesn't
work? Does it give you an error?
On Sat, Jan 8, 2011 at 3:04 PM, LAMP l...@afan.net wrote:
Hi guys,
I wonder how to store to csv or txt file result from SELECT query? not a
whole table nor database. Just results from SELECT
On 7/8/2010 10:59 AM, John Nichel wrote:
Hi,
I'm hoping what I'm trying to do can be done, but I can't seem to find
the right syntax. I have the following query:
SELECT
... snipped ...
if(
(
products a
The query is erroring out on 'd.date' in expression two of the if
statement, #1109 - Unknown table 'd' in field list. Is there a way I
can do a IF((SELECT.), expr2, expr3) and have expr2 populate with
whatever is returned from the select statement? Thank you.
--
John C. Nichel IV
Is there a way I
can do a IF((SELECT.), expr2, expr3) and have expr2 populate with
whatever is returned from the select statement?
Yes, select if( (select count(*) from mytable ) 100, 1, 0) works fine.
The alias inside your last If(...), though, is not visible outside its
parentheses
-Original Message-
From: Peter Brawley [mailto:peter.braw...@earthlink.net]
Sent: Thursday, July 08, 2010 12:27 PM
To: mysql@lists.mysql.com
Subject: Re: Problem with IF() inside of a select statement
Is there a way I
can do a IF((SELECT.), expr2, expr3) and have expr2
Hi;
I posted this Saturday. Perhaps it's too challenging for those who read it
to answer. I hope someone can.
I need to write a select statement that enables me to select column 'ID'
from a table where a certain value is found in an enum of a specific column.
For example...
select column_type
On 12/7/09 5:26 AM, Victor Subervi victorsube...@gmail.com wrote:
Hi;
I posted this Saturday. Perhaps it's too challenging for those who read it
to answer. I hope someone can.
I need to write a select statement that enables me to select column 'ID'
from a table where a certain value
On Mon, Dec 7, 2009 at 8:08 AM, Tom Worster f...@thefsb.org wrote:
On 12/7/09 5:26 AM, Victor Subervi victorsube...@gmail.com wrote:
Hi;
I posted this Saturday. Perhaps it's too challenging for those who read
it
to answer. I hope someone can.
I need to write a select statement
Hi;
I need to write a select statement that enables me to select column 'ID'
from a table where a certain value is found in an enum of a specific column.
For example...
select column_type from information_schema.columns where
table_name='products' and column_name='Categories';
will give me
Velen schrieb:
Hi,
I need to write up a select statement something like:
Select a.supcode,a.code,b.desc,sum(c.qty),c.dept where
a.supcode=b.supcode and a.code=c.code and a.code=b.code and c.dept
between $tring1 and $tring2. group by supcode
This is fine but the problem
Hi,
I need to write up a select statement something like:
Select a.supcode,a.code,b.desc,sum(c.qty),c.dept where a.supcode=b.supcode
and a.code=c.code and a.code=b.code and c.dept between $tring1 and $tring2.
group by supcode
This is fine but the problem is that there is duplicate supcode
Velen schrieb:
Hi,
I need to write up a select statement something like:
Select a.supcode,a.code,b.desc,sum(c.qty),c.dept where
a.supcode=b.supcode and a.code=c.code and a.code=b.code and c.dept
between $tring1 and $tring2. group by supcode
This is fine but the problem
In fact my sql statement is like this:
select b.customer_name Customer,a.sale_id DocNo,a.sale_date Date,a.prod_code
Product,a.quantity Quantity,c.cost_price Cost,a.price Price,
c.prod_description,a.store,d.payMode from sale_trans a,customer_master
b,prod_master c,saletrans_cons d where
Velen,
My problem is that it is displaying a.sale_id but different customer_name
as it is taking sale_id from d and matching cust_code with b
Any non-aggregate SELECTed value that does not have a 1:1 relationship
with your GROUP BY column will show arbitrary results, so the first
thing to get
On Mon, Mar 10, 2008 at 1:38 PM, Peter Brawley
[EMAIL PROTECTED] wrote:
Velen,
My problem is that it is displaying a.sale_id but different customer_name
as it is taking sale_id from d and matching cust_code with b
Any non-aggregate SELECTed value that does not have a 1:1 relationship
Hi,
[EMAIL PROTECTED] schrieb:
Hi,
I have 2 tables as follows:
table 1 contains code,order_qty
table 2 contains code,stock_qty
table 1:
code1, 10
code2, 2
code3, 5
table 2:
code1, 3
code3, 5
code1, 4
code3, 2
I need to see the following result:
code | order_qty| stock_qty
code1 | 10
Hi,
I have 2 tables as follows:
table 1 contains code,order_qty
table 2 contains code,stock_qty
table 1:
code1, 10
code2, 2
code3, 5
table 2:
code1, 3
code3, 5
code1, 4
code3, 2
I need to see the following result:
code | order_qty| stock_qty
code1 | 10 | 7
code2 | 2| 0
Hi,
On Jan 18, 2008 2:59 PM, RoryGRen [EMAIL PROTECTED] wrote:
Hi all
I am quite new to mySQL and have the following question I hope someone can
help me with:
I have a database table imported directly from MS Access with two of the
field names having brackets - F(1) and S(1). I don't want
the database needs
updating.
How can I select these fields from the table? - SELECT F(1), S(1) doesn't
work, SELECT F(1) , S(1) doesn't work and neither does SELECT [F(1)],
[S(1)]
Thanks, in anticipation!
Rory
--
View this message in context:
http://www.nabble.com/Select-statement-help
to 2007-03-01
db3 : 2007-03-01 to 2007-04-01
db4 : 2007-04-01 to 2007-05-01
db5 : 2007-05-01 to 2007-06-01
db6 : 2007-06-01 to 2007-07-01
I require a select statement to query all the db's to identify records with
the date range for eg. 2007-02-15 to 2007-05-12.
Logically this tells me
-01
db3 : 2007-03-01 to 2007-04-01
db4 : 2007-04-01 to 2007-05-01
db5 : 2007-05-01 to 2007-06-01
db6 : 2007-06-01 to 2007-07-01
I require a select statement to query all the db's to identify
records with
the date range for eg. 2007-02-15 to 2007-05-12.
Logically this tells me that the databases
I want to know how to configurate slow-query-log to let it not record the
update sql.
I just want to know how the slow select statement ,not the update or insert.
Anybody's reply is appreciated,thanks.
--
I'm a mysql DBA in china.
More about me just visit here:
http://yueliangdao0608.cublog.cn
I have a table with a PRIMARY KEY on id field, whos
evalue is populated usin auto_increment.
CREATE TABLE `key` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`sid` smallint(4) unsigned NOT NULL DEFAULT '0',
`email` varchar(128) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
]
Phone: (540) 231-4396
-Original Message-
From: Octavian Rasnita [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 27, 2007 2:53 PM
To: Ed Lazor; Price, Randall
Cc: mysql@lists.mysql.com
Subject: Re: select statement with variable for table_reference?
Yes it is a good idea to store in a table
@lists.mysql.com
Sent: Tuesday, June 26, 2007 11:37 PM
Subject: RE: select statement with variable for table_reference?
Ok, I used your approach like this:
--
select i.scanned_barcode, v.title from inventory as i
left join version as v
I am saying here is that the PREPARED STATEMENTS allow you
to basically construct any SQL statement you want and works when you
want to use a variable in places where they are usually not allowed
(i.e., like table names, passing in a variable number of fields for the
SELECT statement, the value
unions, you can do
it
in a final where ... that's outside of those params.
Octavian
- Original Message -
From: Ed Lazor [EMAIL PROTECTED]
To: 'Octavian Rasnita' [EMAIL PROTECTED]; mysql@lists.mysql.com
Sent: Tuesday, June 26, 2007 11:37 PM
Subject: RE: select statement
PROTECTED]
Cc: mysql@lists.mysql.com
Sent: Wednesday, June 27, 2007 8:02 PM
Subject: RE: select statement with variable for table_reference?
Hi Octavian,
First, thanks for helping out. I really appreciate it. Thanks to you
also
Randall.
I am not sure I understand what you want.
If you want
Is there a way to get something like this to work?
Set @tname=mytable;
Select * from @tname;
Here's what I'm trying to really accomplish in case there is yet another way
to approach this...
I have to work with product data from multiple databases and multiple
tables. For example, one database
...;
Octavian
- Original Message -
From: Ed Lazor [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Tuesday, June 26, 2007 10:39 PM
Subject: select statement with variable for table_reference?
Is there a way to get something like this to work?
Set @tname=mytable;
Select * from @tname;
Here's
the relevant tables... some sort of conditional union. Any
ideas?
-Ed
-Original Message-
From: Octavian Rasnita [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 26, 2007 1:02 PM
To: Ed Lazor; mysql@lists.mysql.com
Subject: Re: select statement with variable for table_reference?
I am using
: RE: select statement with variable for table_reference?
Ok, I used your approach like this:
--
select i.scanned_barcode, v.title from inventory as i
left join version as v on i.record_id = v.id
where
i.database_id = '1
Subject: RE: select statement with variable for table_reference?
Ok, I used your approach like this:
--
select i.scanned_barcode, v.title from inventory as i
left join version as v on i.record_id = v.id
where
i.database_id = '1
Thanks for the info Jerry. =)
-Original Message-
From: Jerry Schwartz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 26, 2007 1:59 PM
To: 'Ed Lazor'; 'Octavian Rasnita'; mysql@lists.mysql.com
Subject: RE: select statement with variable for table_reference?
Getting back to your
PROTECTED]
Phone: (540) 231-4396
-Original Message-
From: Ed Lazor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 26, 2007 4:37 PM
To: 'Octavian Rasnita'; mysql@lists.mysql.com
Subject: RE: select statement with variable for table_reference?
Ok, I used your approach like
In PostgreSQL, the following SELECT statement will return all the
columns for 'tabname':
SELECT x.attname FROM pg_attribute x, pg_class y WHERE
x.attrelid=y.oid AND relname='tabname';
Does MySQL have anything similar?
I know about SHOW COLUMNS FROM tabname, but am looking for something
more
Hi Kelly,
Kelly Jones wrote:
In PostgreSQL, the following SELECT statement will return all the
columns for 'tabname':
SELECT x.attname FROM pg_attribute x, pg_class y WHERE
x.attrelid=y.oid AND relname='tabname';
Does MySQL have anything similar?
I know about SHOW COLUMNS FROM tabname
this info, but it doesn't
seem to.
In 5.0 later MySQL implements the ISO SQL spec for information_schema,
which does that.
PB
-
Kelly Jones wrote:
In PostgreSQL, the following SELECT statement will return all the
columns for 'tabname':
SELECT x.attname FROM pg_attribute x, pg_class y
FROM A LEFT JOIN B ON A.C=B.D WHERE B.D IS NULL
- Original Message -
From: Aaron Cannon [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Wednesday, January 03, 2007 3:47 PM
Subject: select statement question
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi all. I hope
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi all. I hope this is the right place to ask this.
I have two tables, A and B. Each of these tables has a column with
integers. The column in table A is C and the one in B is D.
I need a select statement that will return all records whose C
: select statement question
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi all. I hope this is the right place to ask this.
I have two tables, A and B. Each of these tables has a column with
integers. The column in table A is C and the one in B is D.
I need a select statement
Aaron Cannon wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi all. I hope this is the right place to ask this.
I have two tables, A and B. Each of these tables has a column with
integers. The column in table A is C and the one in B is D.
SELECT c.value FROM c WHERE c.value NOT
properly_trained = 1;
ITERATE label1;
END IF;
LEAVE label1;
END LOOP label1;
SET @x = p1;
END
Is this possible. Can you loop through the query results of a SELECT
statement in a trigger, function, or procedure.
Ferindo
: LOOP
IF (pets row.pet_type) = 4 THEN
SET properly_trained = 1;
ITERATE label1;
END IF;
LEAVE label1;
END LOOP label1;
SET @x = p1;
END
Is this possible. Can you loop through the query results of a SELECT
statement in a trigger, function, or procedure.
Ferindo
Check out the section
of answers, since most string comparations are
donde correctly; I received both text and numbers from the monitoring tasks
and wanted to keep it simple.
However when I execute this select statement I am getting this problem:
select info_oficina,valorSNMP from ultimas_respuestas_snmp where
agent returns only strings and I didn't find enough a reason for
converting the different types of answers, since most string comparations are
donde correctly; I received both text and numbers from the monitoring tasks and
wanted to keep it simple.
However when I execute this select statement I am
: Friday, 17 February 2006 11:29 AM
To: mysql@lists.mysql.com
Subject: Hi, newbie question on a select statement
I searched the other lists and couldn't find one that was more appropiate for
this question; if there is, please tell me so :)
I am monitoring networking equipment and so far I'm saving all
Thanks Hank. I'll try to split up the query into 2 separate queries. I think
that the reason the original query is so slow is that I don't have enough RAM
allocated to mysql. When the original query takes place, I see a process
Copying to tmp table on disk. I believe it's writing all
The reason I suggested that you just use the alternative my-huge.cnf file is
because that is a ready-prepared config file optimised for systems with lots of
RAM for MySQL to use. You don't need to know which variable to change - it's
already done for you. You may want/need to tweak stuff later,
Thanks James. I'll definately give that a try. My test server has 1 gig of
ram. In the my-huge.cnf example it says that it's mainly for servers that
have mysql as the main process. On my production server, I have 1 gig of ram,
but it also runs apache, mutliple webstites, mysql, DNS, ftp
Based on the size (and # of colums) of your result set, I'm not sure
any amount of RAM would allow 360,000 records to be stored and sorted
entirely in memory. After some point, mysql just decideds to use a
temp table.
That's the limit of my tweaking skills, so someone else is going to
have to
Now that I know what's causing the slow queries, what can I do to fix it?
The only thing I can suggest is breaking up the query into two parts -
the first part to retrieve just the product codes and salesrank, and
sort and limit that.. save in a temp table or use application code to
retrieve and
statment just
grabs 10 products that are associated with a specific category. The product
table has 650,000 rows and the category table has 8,150,000 rows.
My SELECT statement is:
SELECT pn_pricecompare_catprod.category, pn_pricecompare_catprod.asin,
pn_pricecompare_product.title
.
My SELECT statement is:
SELECT pn_pricecompare_catprod.category, pn_pricecompare_catprod.asin,
pn_pricecompare_product.title, pn_pricecompare_product.prod_id,
pn_pricecompare_product.image_small, pn_pricecompare_product.brand,
pn_pricecompare_product.manufacturer
I don't think the problem is going to be solved with the my.cnf file.
Here's what I would try..
1- run and time the original query without the ORDER BY or LIMIT clauses
2- run and time the following breakdown queries, to see if the
indexes are at least working correctly:
-- test catprod
Thank Hank. I will try this. When you say the table descriptions, do you
mean for me to post my CREATE TABLE syntax of how I created the table?
Thanks,
Grant
Hank [EMAIL PROTECTED] wrote: I don't think the problem is going to be
solved with the my.cnf file.
Here's what I would
That's why I suggested simply using the supplied my-huge.cnf config file,
because I assume it was contructed by some MySQL uber-guru who does know how
much RAM to allocate to each variable!
James Harvard
Like I mentioned before, I am tweaking the .cnf files by blind trial and
error. I
Grant,
You can just to a desc pn_pricecompare_catprod and desc
pn_pricecompare_product and post the results. The CREATE TABLE
statements would be OK, but the describes are better.
The flush the query cache, I think if you do a flush tables.
-Hank
--
MySQL General Mailing List
For list
Hank [EMAIL PROTECTED] wrote on 12/21/2005 09:39:50 AM:
Grant,
You can just to a desc pn_pricecompare_catprod and desc
pn_pricecompare_product and post the results. The CREATE TABLE
statements would be OK, but the describes are better.
The flush the query cache, I think if you do a
OK guys,
Here is are my tables and test SELECT queries. Before every query I did a
FLUSH TABLES command. Before starting these test, I did and ANALYIZE and
OPTIMIZE on all the tables. Hopefully the formatting of this email isn't too
bad.
product table:
show create table
Ok, so the next step would be to try the original query with just the
LIMIT clause, and then just the ORDER BY (but not both).
The results of select count(*) query would be helpful to know just
how many records mysql is trying to sort and limit.
And do you really need a separte index key on
It'll be a few hours before I get home and can do this query with the
variations you mentioned. I don't know if I need the separate index key on
`salesrank` or not. I thought it would speed up my query be having it.
In the previous email I included the results from doing an EXPLAIN.
OK,
I tried the following queries:
1. Use the ORDER BY and not the LIMIT -- still slow
2. Use the LIMIT and not the ORDER BY -- fast
So it looks like it's building a whole temp table with all the items and then
doing the ORDER BY.
Just as a test, I removed the INDEX
category. The product
table has 650,000 rows and the category table has 8,150,000 rows.
My SELECT statement is:
SELECT pn_pricecompare_catprod.category, pn_pricecompare_catprod.asin,
pn_pricecompare_product.title, pn_pricecompare_product.prod_id,
pn_pricecompare_product.image_small
Sujay Koduri wrote:
hi,
i am using MysQL4.1.13. I tried doing the following.
* Open a new session to DB. (Say session 1)
* Using prepared statements provided by C API, issued a select
statement to get some rows from a table.
* This worked absolutely fine.
* I didnt
No I am performing the second select Query only. I am including the pseudo
code which I am trying to do.
Pseudo code
Establish a connection to DB
Get statement handler
While(conditon) {
Prepare a select statement.
Bind input variable.
Execute the statement.
Bind o/p vars.
Fetch results.
Wait
HI,
n(say session 2) and updated the entries in the table. Did a
commit.
* Now i issued the second select statement on session 1, but still it
is showing the old results. Idealy it should show the new results, which are
a result of updations done using session 2.
But when i issue a commit
Thanks a lot Philippe. Its working. :)
sujay
-Original Message-
From: Philippe Poelvoorde [mailto:[EMAIL PROTECTED]
Sent: Friday, August 19, 2005 12:43 PM
To: 'mysql@lists.mysql.com '
Subject: Re: Commit needed even after a select statement ??
HI,
n(say session 2) and updated
hi,
i am using MysQL4.1.13. I tried doing the following.
* Open a new session to DB. (Say session 1)
* Using prepared statements provided by C API, issued a select
statement to get some rows from a table.
* This worked absolutely fine.
* I didnt close the session
Is this not the proper way to use a function in a select statement?
SELECT
t.field1,
t.field2,
functionPerformAdditionalQueryFromField(t.field2) AS 'customField'
FROM Table t
I'd like to perform the function on every row in the result set, and
store the returned value of that function in EACH
-
From: Scott Klarenbach [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 31, 2005 10:58 AM
To: My SQL
Subject: Call a function from a select statement?
Is this not the proper way to use a function in a select statement?
SELECT
t.field1,
t.field2
10:58 AM
To: My SQL
Subject: Call a function from a select statement?
Is this not the proper way to use a function in a select statement?
SELECT
t.field1,
t.field2,
functionPerformAdditionalQueryFromField(t.field2) AS 'customField'
FROM Table t
I'd like to perform
@lists.mysql.com '
Subject: re: using if in select statement
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
My boss and I were playing with using select statements, and we can
actually execute subqueries as an option if the result is true or false.
Is this expected behavior, or is it something that may be fixed
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
My boss and I were playing with using select statements, and we can
actually execute subqueries as an option if the result is true or false.
Is this expected behavior, or is it something that may be fixed in a
revision, before I begin to depend on it
I need to execute an INSERT...SELECT query.
INSERT HIGH_PRIORITY INTO stations_data
(station_id,
Tmin,
Tmax,
Tmed,
RHmin,
RHmax,
RHmed,
rain,
Wmax,
slpres,
insertion_date)
(
SELECT
stations.station_id AS stId,
min(stations_rt_data.T) AS tmax,
I'm trying to do a select statement where:
field targetApp equals the value acadreg and
field accessed equals the value Y and
filed enteredQue is like 2004-11-09 18% the whole enterqueue
fieild is something like 2004-11-09 16:00:34
Here's what I'm trying to accomplish, I want to get all
How about
SELECT * FROM queLog
WHERE accessed = Y
AND targetApp = acadreg
AND enteredQue = '2004-11-09 18:00:00';
(You said greater than first, then you said greater than or equal to. I
went with the latter.)
Michael
Kory Wheatley wrote:
I'm trying to do a select statement where:
field
On 29 Oct 2004, at 00:37, Mulley, Nikhil wrote:
How do I dump the data from console to the text file from the output
generated by SELECT statement ?
If it's a small answer that you're just trying to save to a file for
note-keeping purposes, you could run
mysql -e 'select * from thing where foo
Hi List,
How do I dump the data from console to the text file from the output generated by
SELECT statement ?
Thanks,
Nikhil.
1 - 100 of 323 matches
Mail list logo