Hi,
I am trying to JOIN 2 tables TBL1 and TBL2 on TBL1.fld_id
= TBL2.fld_id . And finally I filter out the results that
i need in the where clause using
where TBL1.fld_col = 100;
Running an EXPLAIN shows that it is an impossible where
condition. This may be because there may be no rows
On Tue, 2006-08-01 at 16:23 -0700, Robert DiFalco wrote:
I have a table that contains properties that can be associated with any
table whose primary key is a LONG. Lets say that there is just one kind
of property. The table looks something like this:
TABLE StringVal
REF_ID BIGINT
@lists.mysql.com
Sent: Tuesday, June 27, 2006 5:15 PM
Subject: Re: Please Help - Stored Procedure Issue
On Tuesday 27 June 2006 01:52 pm, Jesse wrote:
@cInvNo
replace all instances of this with just cInvNo. cInvNo is already
declared as
an OUT variable, and @cInvNo will be set to that value
On Tuesday 27 June 2006 01:52 pm, Jesse wrote:
@cInvNo
replace all instances of this with just cInvNo. cInvNo is already declared as
an OUT variable, and @cInvNo will be set to that value when you run:
CALL sp_GetNextInv(-1,@cInvNo);
--
Chris White
PHP Programmer/DBBD
Interfuel
--
MySQL
You want a LEFT (OUTER) JOIN, which will return nulls for the columns if no
match on the join expression.
-Original Message-
From: Paul Nowosielski [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 14, 2006 4:44 PM
To: mysql@lists.mysql.com
Subject: Join help
Dear All,
I'm working on a
On 6/2/06, yuan edit [EMAIL PROTECTED] wrote:
my operating system is linux redhat 9.0.
i am installing mysql 5.0.x binary distribution.
Which edition is the most fit in the following editions?
You notices most of those files are .asc and .md5 used to verify the
integrity of the archive after
Lew E. Lefton wrote:
Hi,
I hope this is an appropriate place to ask this question, if you think
it is better suited for another list/forum, please let me know.
I have a table that looks like this:
mysql select polynomial_id, term_id from polynomial;
+---+-+
|
, 2006 12:25:50 PM CDT
To: Joseph Alotta [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Subject: Re: please help optimize this query
I'd start by looking at your schema.. Quite a lot of use of
varchars... I'd suggest using chars (takes more space but processes
faster).. Or even better, normalize
Lew,
If I have another polynomial, say the sum of terms 1,3,4, and 5, how
can I quickly search this
database to see if it's already been stored?
SELECT DISTINCT polynomial_id
FROM polynomial p1
INNER JOIN polynomial p2 ON p1.term_id=1 AND p2.term_id=3
INNER JOIN polynomial p3 ON p2.term_id=3
2006/5/31, Peter Brawley [EMAIL PROTECTED]:
Lew,
If I have another polynomial, say the sum of terms 1,3,4, and 5, how
can I quickly search this
database to see if it's already been stored?
SELECT DISTINCT polynomial_id
FROM polynomial p1
INNER JOIN polynomial p2 ON p1.term_id=1 AND
I'd start by looking at your schema.. Quite a lot of use of
varchars... I'd suggest using chars (takes more space but processes
faster).. Or even better, normalize the data so that you have a table
for symbols that is linked to this table via an integer based foreign
key.
Also it seems wierd
Hi,
I guess you should be able to do something like:
SELECT t1.term_id, t1.name, r.type_id, t2.term_id, t2.name
FROM term t1
LEFT JOIN relationTerm r ON r.term_id1 = t1.term_id
LEFT JOIN term t2 ON r.term_id2 = t2.term_id
/Johan
mel list_php skrev:
Hi!
I'm stuck with a join query
2
Perfect!
I tried aliasing the field names but didn't think about the table, and was
just stuck looking at that query without any idea...
Thanks a lot for your help.
melanie
From: Johan Höök [EMAIL PROTECTED]
To: mel list_php [EMAIL PROTECTED]
CC: mysql@lists.mysql.com
Subject: Re: query
Daevid,
This is my first trigger I'm trying to write.
I have two tables. 'stores' and 'zipcodes'.
I want to automatically set the latitude and longitude of the store using
it's zipcode lookup in the zipcode table.
DELIMITER $$;
DROP TRIGGER `store_coord`$$
create trigger `store_coord`
You cannot get data out of a database if it's not in the database. If
there's no data for a day, you cannot get 0 for that day, because the
day does not exist in the database. You could make a calendar
table, one row per day, and join it with a count to get 0 for the day.
-Sheeri
On 5/15/06,
I've had this same problem -- if the database loses connection at the
same time the log file flushes, you need to SET MASTER_LOG_FILE and
MASTER_LOG_POS again and restart. I believe this probably qualifies
as a bug if you want to report it.
The reason the slave isn't updating log5 is because
Barry wrote:
Hello everyone!
snip
I have a table with saved clicks by users.
Now i want to draw a graph with a php extension.
Problem is: if i let me show the clicks, one day is missing.
Because on that day noone clicked on the link.
I use this query:
SELECT DATE(c_clicktime) AS clicktime,
This is my first trigger I'm trying to write.
I have two tables. 'stores' and 'zipcodes'.
I want to automatically set the latitude and longitude of
the store using
it's zipcode lookup in the zipcode table.
DELIMITER $$;
DROP TRIGGER `store_coord`$$
create trigger
May 2006 2:41 p.m.
To: 'Martijn Tonies'; mysql@lists.mysql.com
Subject: RE: Need help with triggers
This is my first trigger I'm trying to write.
I have two tables. 'stores' and 'zipcodes'.
I want to automatically set the latitude and longitude of
the store using
it's zipcode lookup
Daevid,
This is my first trigger I'm trying to write.
I have two tables. 'stores' and 'zipcodes'.
I want to automatically set the latitude and
longitude of the store using
it's zipcode lookup in the zipcode table.
DELIMITER $$;
DROP TRIGGER `store_coord`$$
create trigger
hi,
Just to add up i have read some where ( i assume in the mailing list
only) that OS recognizes the file based on few codes added at the
starting / ending of a file. So there are ways to create a MYD file
through vi editor as well (this is not from the angle of restoring the
data in that
*Ok Daniel,*
**
* Thank you.*
**
*regards,*
*bala*
**
Hi,
please tell me the server uptime and also the master logs as
show master logs;
in mysql prompt.
Yes u can restore data from the binlog if you have the binlogs.
balaraju mandala wrote:
Hi Dilip,
it means i loosed the data, correct Dilip. is there any other way to gain
that data, any
Hi Dilip,
I got two binary logs in Server. I don't know how to find server uptime?
mysql show master logs;
+--+
| Log_name |
+--+
| localhost-bin.08 |
| localhost-bin.09 |
+--+
2 rows in set (0.00 sec)
if i ask for
On 5/9/06, balaraju mandala [EMAIL PROTECTED] wrote:
Hi Dilip,
I got two binary logs in Server. I don't know how to find server uptime?
mysql show master logs;
+--+
| Log_name |
+--+
| localhost-bin.08 |
| localhost-bin.09 |
Thank you Daniel for reply.
Just in curiocity i want ask u, how u r taking daily backups, just using
'mysqldump' or using any Tools.
regards,
bala
On 5/9/06, balaraju mandala [EMAIL PROTECTED] wrote:
Thank you Daniel for reply.
Just in curiocity i want ask u, how u r taking daily backups, just using
'mysqldump' or using any Tools.
I'm using mysqldump plus bzip2 to compress data for about 2 years now.
Tried many tools, mysqldump
Hi,
If you have deleted .MYD files then truncate the table and restore it
from the backup if yu have.
MYD means your precious data which contains.
balaraju mandala wrote:
Dear Comunity,
I need your help. I accidently deleted some '.MYD' files. I want to
restore
them, without stopping
Hi Dilip,
it means i loosed the data, correct Dilip. is there any other way to gain
that data, any binary logs etc?
regards,
bala
SELECT id, count(*) AS cnt
FROM `table_name`
GROUP BY id
ORDER BY cnt DESC
[ LIMIT 1 ]
--
Gabriel PREDA
Senior Web Developer
Thanks that got it.
Robert Gehrig
Webmaster at www.gdbarri.com
e-mail: [EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
On 4/26/06, Shawn Green [EMAIL PROTECTED] wrote:
--- Patrick Aljord [EMAIL PROTECTED] wrote:
On 4/26/06, Patrick Aljord [EMAIL PROTECTED] wrote:
I have a table confs like this:
id int 5 auto_increment primary key;
conf text;
and another table conf_ip like this:
id int 5
--- Patrick Aljord [EMAIL PROTECTED] wrote:
I have a table confs like this:
id int 5 auto_increment primary key;
conf text;
and another table conf_ip like this:
id int 5 auto_increment primary key;
conf_id int 5; ==foreing key of confs
ip varchar 150;
I would like to
select id,
On 4/26/06, Patrick Aljord [EMAIL PROTECTED] wrote:
I have a table confs like this:
id int 5 auto_increment primary key;
conf text;
and another table conf_ip like this:
id int 5 auto_increment primary key;
conf_id int 5; ==foreing key of confs
ip varchar 150;
ok, sorry all for not being
--- Patrick Aljord [EMAIL PROTECTED] wrote:
On 4/26/06, Patrick Aljord [EMAIL PROTECTED] wrote:
I have a table confs like this:
id int 5 auto_increment primary key;
conf text;
and another table conf_ip like this:
id int 5 auto_increment primary key;
conf_id int 5; ==foreing key
First of all, I'm going to guess that English is not your first language and
tell you that jointure is not the word normally to describe the process of
combining two tables in a database: the word you want is joining.
Second, there are many kinds of joins and you haven't specified which kind
What makes you think the delete of the database failed? It looks like the
message from the DROP command indicates that the database was dropped
successfully.
--
Rhino
- Original Message -
From: Randy Paries [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Saturday, April 22, 2006
Randy Paries wrote:
Hello,
Not sure what is going on
i have mysql Ver 12.22 Distrib 4.0.17,
I have a database that i can not delete.
i do this
#mysqladmin drop billmax -u admin --password
Enter password:
Dropping the database is potentially a very bad thing to do.
Any data stored in the
Sample Data:
ID-Row1-Row2
1-A-B
2-A-B
Row1 and Row2 are duplicate, so you only want one. Which ID do you want?
-will
On 4/17/06, Patrick Aljord [EMAIL PROTECTED] wrote:
hey all,
I have a table mytable that looks like this:
id tinyint primary key auto_increment
row1 varchar 150
row2
If the ID doesn't represent anything, you can
CREATE TABLE new_table SELECT DISTINCT Row1, Row2 FROM old_table
And then recreate your index(es).
All your autoincrement IDs will be changed.
On 4/17/06, Patrick Aljord [EMAIL PROTECTED] wrote:
On 4/18/06, William Fong [EMAIL PROTECTED] wrote:
2wsxdr5 wrote:
I have a table of people. Some of the people in this table are
related. You can find out who is related by comparing a familyID
number. I have a query to select a certain group of people from the
table and I want to also select anyone who is related to them, even
though
David Godsey [EMAIL PROTECTED] wrote on 03/22/2006 01:21:07 PM:
I'm in the process of writing my first UDF and would appreciate some
help.
I am pulling data from a table like:
SELECT payload_time,
SUBSTR(BINARY(frame_data),
FLOOR(foffset/8)+1,
Just figured it out without a UDF(not documented anywhere that I found).
SELECT conv(hex(fdata),16,10) INTO fdata_bigint;
So a double conversion seems to work for me.
You solution looks like it will work, but since I was able to get it to
work without a UDF, I'm not going to test it out.
This is actually for Linux/Unix, not Windows.
What error do you get from MySQL when trying to log in? Does the
mysqld(-nt) process show within Task Manager? What does the new error
log say?
You may need to reset permissions:
http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
not sure, but it may be worth trying the following
run the script:
mysql_install_db --user=root
In the installation dir
this should change ownership and make mysql recognise the data dir.
good luck
Ade
Foo Ji-Haw wrote:
Hi all,
My Windows-based database server crashed (no fault of MySQL.
Thanks for coming to the rescue, Mark and Bruce.
Mark Leith wrote:
This is actually for Linux/Unix, not Windows.
What error do you get from MySQL when trying to log in? Does the
mysqld(-nt) process show within Task Manager? What does the new error
log say?
You may need to reset
OKAN ARI wrote:
I have 3 tables
Table 1: user(id, name, surname)
Table 2: crime(id, detail)
Table 3: user_crime(id, user_id, crime_id)
Table 1
1, OKAN, ARI
Table 2
1, detail 1
2, Detail 2
Table 3
1, 1, 1
1, 1, 2
So user 1 takes 2 crime from crime table...
I want to receive info with 1
clint lenard wrote:
Hey Guys,
I was wondering if I could get some assistance with building a
Simple Import Script using PHP and MySQL. Basically I'm trying to pull
info out of one Table and Insert it into the other Table.
Can anyone show me a simple example of this? I can figure out how to
That SQL 101.
It's a basic INSERT / SELECT.
http://dev.mysql.com/doc/refman/4.1/en/insert-select.html
Scroll down for the examples.
-Original Message-
From: clint lenard [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 08, 2006 8:54 PM
To: mysql@lists.mysql.com
Subject: Need help with
13.1.5.1. Silent Column Specification Changes
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
[(create_definition,...)]
[table_options] [select_statement]
^^^
Regards
Keith
In theory, theory and practice are the same;
In practice they are not.
On
-Original Message-
From: Ing. Edwin Cruz [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 02, 2006 3:03 PM
To: Price, Randall
Subject: RE: Qyery help - pass string to stored procedure for IN clause
What abaut this:
CREATE PROCEDURE spGetNames (IN strNames VARCHAR(255))
BEGIN
I am a novice when it come to queries such as this and was hoping
someone could help me write a query that tells me how many records
have the same ID and vendor number.
|ID| vendor_no| date|
|2354 | 578 | 2005-12-23|
|2355 | 334 |
Richard,
If you mean with _both_ the same id _and_ vendor id, try this:
Select id, vendor_id, count(*) from tablename group by id, vendor_id;
If you just want separate counts for id and vendor_id, use:
Select id, count(*) from tablename group by id;
Select vendor_id, count(*) from tablename
I's so sorry. You are very correct. The sample data is bad. ID should be
unique. Here it is corrected.
|ID| vendor_no| date|
|2354 | 578 | 2005-12-23|
|2355 | 334 | 2005-12-24|
|2356 | 339 | 2005-12-26|
|2357 | 339
If you are looking just for duplicate (ID,vendort_no) combinations, this
will find them:
SELECT ID, vendor_no, count(1) as dupes
FROM table_name_here
GROUP BY ID, vendor_no
HAVING dupes 1;
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
Richard Reina [EMAIL PROTECTED]
Actually I am looking for duplicates (vedor_no, date), but I think I can
hopefully adapt the solution you have given me.
[EMAIL PROTECTED] wrote:
If you are looking just for duplicate (ID,vendort_no) combinations, this will
find them:
SELECT ID, vendor_no, count(1) as dupes
FROM
If you mean a slave that replicates more than one master, that is not
possible --
ie, this is not possible:
Master1 --
|-- Slave
Master 2 -
However, if you mean:
Master 1 --- Master2
Then all you have to do is set up replication so Master2 is a slave
What are the problems you've been experiencing? Did you convert all tables?
How big is the database?
On 2/9/06, Shaun Adams [EMAIL PROTECTED] wrote:
I have a customer who has been in production for a few weeks now having
converted from MyISM to INNODB. We have been experiencing a few problems
Shaun,
the my.cnf looks ok. You might be able to raise the InnoDB buffer pool size
to 3G, but beware swapping.
SHOW INNODB STATUS looks ok, though it would be more informative if it were
taken during a typical workload.
Free buffers 0
Having free buffers 0 is very normal. Buffers
Ian Barnes wrote:
Hi,
This is my current query which works in mysql 4, but not in 5. Its from
mambo, but im trying to modify it because they don't officially support
mysql5 yet.
The original query:
SELECT c.*, g.name AS groupname, cc.name, u.name AS editor, f.content_id AS
frontpage, s.title
, cc.title, c.ordering LIMIT 0,10;
Thanks,
Ian
-Original Message-
From: gerald_clark [mailto:[EMAIL PROTECTED]
Sent: 24 January 2006 09:50 PM
To: Ian Barnes
Cc: mysql@lists.mysql.com
Subject: Re: Query Help
Ian Barnes wrote:
Hi,
This is my current query which works in mysql 4
PM
To: Ian Barnes
Cc: mysql@lists.mysql.com
Subject: Re: Query Help
Ian Barnes wrote:
Hi,
This is my current query which works in mysql 4, but not in 5. Its from
mambo, but im trying to modify it because they don't officially support
mysql5 yet.
The original query:
SELECT c
Subject: Re: Query Help
Ian Barnes wrote:
Hi,
This is my current query which works in mysql 4, but not in 5. Its from
mambo, but im trying to modify it because they don't officially support
mysql5 yet.
The original query:
SELECT c.*, g.name AS groupname, cc.name, u.name AS editor
Mark Phillips wrote:
I am running mysql 4.0.24 on Debian sarge.
I have a table with two columns, team and division, both varchar(255).
There are some errors in the table where division has a value but team is
blank. Given that I am getting new data, and the data entry folks may create
a
On Monday 23 January 2006 03:33 pm, Michael Stassen wrote:
Mark Phillips wrote:
I am running mysql 4.0.24 on Debian sarge.
I have a table with two columns, team and division, both varchar(255).
There are some errors in the table where division has a value but team is
blank. Given
Hello.
ERROR 1314 (0A000): PREPARE is not allowed in stored procedures
PREPARE in the stored procedures should work in the latest release (5.0.18).
David Godsey wrote:
Thank you. I tried this outside of the procedure and it works. However In
MYSQL 5 I get:
ERROR 1314 (0A000): PREPARE is
Hello.
You can use this technique:
drop procedure if exists test20;
DELIMITER $$
create procedure test20()
BEGIN
DECLARE fdata BLOB;
DECLARE foffset INT UNSIGNED;
DECLARE flength INT UNSIGNED;
DECLARE tmp_int BIGINT UNSIGNED;
SELECT
Thank you. I tried this outside of the procedure and it works. However In
MYSQL 5 I get:
ERROR 1314 (0A000): PREPARE is not allowed in stored procedures
Is there a way without needing to use prepare?
Any idea why CAST(fdata AS UNSIGNED) doesn't work?
David Godsey
Hello.
You can use this
Hello.
See:
http://dev.mysql.com/doc/refman/5.0/en/access-denied.html
Wade Smart wrote:
01182006 1627 GMT-6
Im on Ubuntu. I have mysql 4.0.24. I have phpmyadmin installed.
Im a little frustrated at this point so bear with me.
Mysql is running.
My book says type in: mysql -h localhost
OK, turns out this was a two fold issue.
The server I was on had 4.0 mySQL, which was severely limited in it's
abilities to use subqueries. The server has since been update to the 4.1
series, and now the following 2-subquery query work just fine.
SELECT firstname, lastname, B.playerid,
On Jan 6, 2006, at 4:38 PM, Jeffrey Goldberg wrote:
I'm using SuSE 9.3 (not the Enterprise Server), and I would like to
upgrade from MySQL 4.1 to the latest stable version. There do not
appear to be SuSE rpms for 5.0.
Someone has kindly pointed out to me off-list that there are generic
Thank you very much to all who responded. I ended up using Shawn's solution,
the others seem good as well.
Thanks again. Have a great weekend.
Richard
[EMAIL PROTECTED] wrote:
Try this:
SELECT c_no
, SUM(1) as total_tx
, SUM(if(`date` = now() - interval 6 month,1,0))
- Original Message -
From: Richard Reina [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Thursday, January 05, 2006 10:29 AM
Subject: SELECT help.
Can someone help me write a query to tell me the customer numbers (C_NO)
of those who've had more than 4 transactions but none in
3.23.54
Thanks.
Rhino [EMAIL PROTECTED] wrote:
- Original Message -
From: Richard Reina
To:
Sent: Thursday, January 05, 2006 10:29 AM
Subject: SELECT help.
Can someone help me write a query to tell me the customer numbers (C_NO)
of those who've had more than 4 transactions
Try this:
SELECT c_no
, SUM(1) as total_tx
, SUM(if(`date` = now() - interval 6 month,1,0)) as recent_tx
FROM transactions_table
GROUP BY c_no
HAVING total_tx 4 and recent_tx = 0;
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
Rhino [EMAIL PROTECTED] wrote on
Richard Reina wrote:
Can someone help me write a query to tell me the customer numbers (C_NO) of
those who've had more than 4 transactions but none in the last 6 months?
transactions_table
| ID | C_NO |DATE | AMOUT |
| 2901 | 387 | 2003-10-09 | 23.00 |
Obviously my
This should work:
select c_name, count(t1.id) as t_count from customers c
inner join transactions t1 on c.c_no = t1.c_no
left join transactions t2 on c.c_no = t2.c_no and t2.date '2005-06-05'
where t2.id is null
group by c.c_no
having t_count 4;
There may be more efficient way of doing this
Richard,
Can someone help me write a query to tell me the customer numbers
(C_NO) of those who've had more than 4 transactions but none in
the last 6 months?
Something like this?
SELECT
c_no,
COUNT(c_no) AS cnt
FROM transactions_table
WHERE NOT EXISTS (
SELECT c_no
FROM
Thanks for your kind words of opinion, if you feel you have a better
way please do go ahead , i am going to show you the sql i ended up
using which was a union to append the current summary at the end, i
then had to use php afterwards to add up the totals as i was getting
unexpected results
Dan Rossi [EMAIL PROTECTED] wrote on 12/29/2005 07:19:13 AM:
Thanks for your kind words of opinion, if you feel you have a better
way please do go ahead , i am going to show you the sql i ended up
using which was a union to append the current summary at the end, i
then had to use php
It's not as simple as that. First, if you subtract the curdate() from the
birthday (or vice versa), you end up with some large number that isn't the
actual age at all. So, the calculation is a bit more complicated than that.
Also, I'm not interested in their current age, but their age at the
Jesse,
Therefore, instead of putting that long calculation in my query every
time,
I'm looking for a simpler solution, a more automatic one.
CREATE FUNCTION Age( dob DATE, today DATE ) RETURNS INTEGER
DETERMINISTIC
BEGIN
RETURN DATE_FORMAT(FROM_DAYS(TO_DAYS(today) - TO_DAYS(dob)), '%Y') + 0;
You seem to be coming at SQL with a COBOL perspective. Views are something
you typically create just once and they stay updated automatically. They
work like tables not like queries. Assigning variables to each column of a
view doesn't make any sense (in the SQL sense of view) as each column
,
Jesse
- Original Message -
From: Peter Brawley [EMAIL PROTECTED]
To: Jesse [EMAIL PROTECTED]
Cc: MySQL List mysql@lists.mysql.com
Sent: Wednesday, December 28, 2005 10:20 AM
Subject: Re: Need Help Writing a Trigger
Jesse,
Therefore, instead of putting that long calculation in my query
]
To: Jesse [EMAIL PROTECTED]
Cc: MySQL List mysql@lists.mysql.com
Sent: Wednesday, December 28, 2005 10:20 AM
Subject: Re: Need Help Writing a Trigger
Jesse,
Therefore, instead of putting that long calculation in my query every
time,
I'm looking for a simpler solution, a more automatic one
Aftab Khan [EMAIL PROTECTED] wrote on 12/28/2005 02:15:33 PM:
Can some one please tell me what I am doing wrong here I have
installed
and configured users in the database. I am using ODBC driver to logon.
When I use the password, it does not work but surprisingly the logon is
allowed
]
To: Jesse [EMAIL PROTECTED]
Cc: MySQL List mysql@lists.mysql.com
Sent: Wednesday, December 28, 2005 1:48 PM
Subject: Re: Need Help Writing a Trigger
Jesse,
BTW, is there a way to change this function so that it does away with the
today variable, and uses a field from a different database? For
instance
Um, thast exactly right each select is a list of results , i want to
merge them then manipulate the data after putting them into a view,
maybe a temp table is needed for this but i dont really want to do an
entire create table statement aswell :\
On 29/12/2005, at 2:48 AM, [EMAIL PROTECTED]
Btwi dont want the column of a view to be a variable, i think thats
what it thinks ! Im just needing to send the value of the current
primary key field top a sub query !
Read my latest post if i can get around not using variables, and still
manage to get the right values of a current row
I just tried to create a Function or Stored Procedure instead of making
variables but it didnt even let me do this
CREATE FUNCTION test (customerID, month, producerID)
RETURN SELECT SUM(fu.bandwidth) FROM feed_usage fu WHERE
fu.customerID=customerID AND fu.month=month AND fu.feedID IN (SELECT
Dan,
You need to shoot your SQL tutor. Whoever taught you to write aggregate
queries seriously took your money. You DO NOT need to use subqueries to do
what you want to do. You do not need to write a full CREATE TABLE
statement to create a temporary table (see other response). You do not
need
On Tuesday 27 December 2005 2:34 pm, Jesse wrote:
I'm trying to write a trigger that will update the age of a camper when
ever a record is updated or inserted. I have a table named Campers which
contains basic information about the camper as well as their birthday. I
have another table named
Dan Rossi [EMAIL PROTECTED] wrote on 12/27/2005 11:39:57 PM:
Hi there i am trying to use usewr variables in a select statement to
add to a where clause in a sub query. Ie
select @id:=id,@month:=month, (select SUM(totals) from table where
[EMAIL PROTECTED] and [EMAIL PROTECTED]) as totals
I have an unfinished query, i am trying to test, basically im required
to get the value of the current field in a row and use it for a
subquery in that row :| Its not a working query, and im not asking for
someone to fix it, however as u can see i need to send the customerID
and month to the
Mark Phillips wrote:
David,
This is what I got:
[EMAIL PROTECTED]:~$ aliases
bash: aliases: command not found
Your shell is bash, so the correct command is `alias`.
[EMAIL PROTECTED]:~$ which mysql
/usr/bin/mysql
Since you are using bash, it's a better idea to use `type` instead of
Here are the results of alias and type
[EMAIL PROTECTED]:~$ alias
alias ls='ls --color=auto'
[EMAIL PROTECTED]:~$ type mysql
mysql is /usr/bin/mysql
And for the emily account:
[EMAIL PROTECTED]:/home/mark$ alias
alias ls='ls --color=auto'
[EMAIL PROTECTED]:/home/mark$ type mysql
mysql is
You will experience the same problem with old-client vs. new-server
authentication as you did when you first set up your user accounts for 4.1
but other than that , it should be compatible.
http://dev.mysql.com/doc/refman/5.0/en/old-client.html
Shawn Green
Database Administrator
Unimin
Hello.
In my opinion, if it works in general with 5.0. MySQL tries to keep
backward compatibility for its products as much as possible. So it
should work, however, not all features of 5.0 could be available. MyODBC
3.51.12 is suitable for use with any MySQL version including MySQL 4.1
or
Hi Mark,
Have you checked to see if you any aliases set? It might be using that
instead of the mysql command. May well be worth checking your path to
ensure you aren't picking up a script called mysql or something similar.
Regards
David Logan
Database Administrator
HP Managed Services
148
David,
How do I do that?
Thanks!
Mark
On Wednesday 21 December 2005 11:37 pm, Logan, David (SST - Adelaide) wrote:
Hi Mark,
Have you checked to see if you any aliases set? It might be using that
instead of the mysql command. May well be worth checking your path to
ensure you aren't
301 - 400 of 1409 matches
Mail list logo