Hi MySQL Users-
I have a query problem I have been working on for quite some time and I am
really at a loss to find a native function(s) to handle my task.
I have this table:
CREATE TABLE BookCategoryMetrics (
BookName VARCHAR(255),
CategoryId VARCHAR(128),
RatingSum DOUBLE,
Cost DOUBLE,
Hello MySQL Users-
I am pretty sure this is a simple question and I am over thinking how to
solve the problem, so I am hoping the community can help.
I am selecting a pretty straightforward aggregation from a single stats
table with the following format:
SELECT
Description
Hello Users-
I think I have an interesting question with regards to applying a function
to date range, I think half of problem solving is explaining it to an
audience so please, bear with me.
There is a table Orders that has two DATE columns, StartDate and EndDate.
The range of dates can vary
I have a pretty large file with a Date column in the format M/D/.
Is there a way to either change the Date data type in the table or a method
to indicate the date format in the LOAD DATA statement in order to handle
this?
Thanks in advance for any help!
David
--
MySQL General Mailing
Im trying to get dynamically insert the current date into a LOAD FILE
statement for some ETL automation, but Im having difficulty passing the
string into the LOAD statement:
This will not work.
SELECT @Today:=CURDATE();
LOAD DATA LOCAL INFILE '/s3/data/[EMAIL PROTECTED]' INTO TABLE Data;
Hello - Since recently switching from MyISAM to InnoDB tables in 4.1 on RH
Linux I receive this error when attempting to dump some tables.
mysqldump: Error 2013: Lost connection to MySQL server during query when
dumping table `campaigns` at row: 14721
Any idea what could be causing this?
Are you assuming that all months have 30 days? You can use the same syntax
with INTERVAL 1 MONTH
I would also format the date comparison to use the same precision that the
DATE_ADD function outputs.
So,
DATE_ADD(table.date, INTERVAL 1 MONTH) = DATE_FORMAT(CURDATE(), '%Y-%m-%d')
I might be off
Im looking for a way to output a file into true CSV format (with quoted
fields) using the Perl DBI.
Does anyone know of a way to do this (in either native MySQL or Perl)?
Thanks as always!
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
When executing:
CREATE TEMPORARY TABLE temp_1 AS
SELECT * FROM table_name
Is it possible to indicate an index within the syntax of this statement - as
opposed to issuing an ALTER TABLE command after the table is created?
Thanks in advance for any help.
--
MySQL General Mailing List
For
Im finding that when I execute a query joining to a large fact table (~450
million rows) using a composite key of INT(11) DATE for a single Date i.e.
AND dimension.id = factable.id
AND factable.Date = '2004-06-22'
the query returns exceptionally fast. However, when I change this to a
range,
'
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 22, 2004 3:16 PM
To: David Perron
Cc: [EMAIL PROTECTED]
Subject: Re: Using date ranges on a composite key degrades performance
Are you using the JOIN ... ON... syntax or the comma syntax of joining
Does anyone know of a way to use a SELECT statement to get the default value
for a column?
A DESCRIBE tabl_name col_name gives the values, but I need it inside a
SELECT.
Thanks.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
I have a query similar to the one below. Im trying to force a STRAIGHT
JOING to Table5 which has an index on Id Date.
For some reason, the optimizer isnt picking the INDEX to execute the query
(and subsequently doing a full scan on a 250 million+ row table)
so Im trying to force the STRAIGHT
Does anyone know if the presentations from the User Conference are available
online?
Thanks
dp
Is it possible to query a tmp table that mysql creates automatically when
dealing with large queries?
When I do a 'show processlist' and it gives a state of 'Copying to tmp
table' , is there a way to query or access this tmp table to see the status
of the query?
Im thinking this would give me an
Are nested IF statements valid? Doesn't say anything here:
http://www.mysql.com/doc/en/Control_flow_functions.html
Trying to get a conditional count using the following statement - but Im
receiving an error. I would use a CASE statement but my version
doesn't support it.
Is it possible to use a primary key to avoid duplicates? The reaction to
duplicate rows will depend on what type of statement you are issuing.
An update/delete would update/delete all rows that are relevant, a select
would return multiple rows with the same values.
-Original Message-
How can I select a mysql version of the Oracle 'rownum' inside a SQL
statement?
I need to include this for a ranking type functionality - but I don't see
this type of analytic functionality.
Any help would be appreciated.
David
What does the explain look like?
-Original Message-
From: Eric Scuccimarra [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 25, 2004 1:03 PM
To: [EMAIL PROTECTED]
Subject: Query Problems
I am doing a very simple query joining two copies of tables with identical
structures but
Greetings -
Been scouring the docs for this all day and I come up with nothing for
'delimiter' - Id like to change the default delimiter in mysql to something
other than tab.
Is there a command to do this, and what are the options?
Thank you!
David
with different characters:
http://www.mysql.com/doc/en/LOAD_DATA.html
On Mon, 2004-02-23 at 13:53, David Perron wrote:
Greetings -
Been scouring the docs for this all day and I come up with nothing for
'delimiter' - Id like to change the default delimiter in mysql to
something
other than tab
Hello-
Is there a way to change the default mysql encoding to be something else,
say UTF-16LE at the session level?
As always, thanks!
__
David Perron
Sales Professional Services Consultant
P: 212-624-9600 ext. 221
C: 917-678-2081
You would use a concept called auto-increment, and you can create it when
you create your tables:
CREATE TABLE animals (
id MEDIUMINT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY (id)
);
More information here:
Is there a way to do this? Im trying to LEFT JOIN to a table that needs to
select based on 2 keys, but the query Im writing only has the keys
individually in two separate tables, like this.
The documentation shows how to do this when you are using 2 keys from both
tables, but not 1 key from 1
I have a sql file that I would like to convert to an ER diagram - any
suggestions on a tool (free if possible) that would help me do this?
Thanks for your suggestions.
Iom trying to figure out to use mysqld and set this varible so that when I
execute sql scripts, the case is considered.
Running this version of mysql in Windows XP Pro.
mysql select version();
++
| version() |
++
|
Im trying to retreive the data from a LONGBLOB column but I have been unable
to convert the binary data back to character data.
Is there something Im not doing right with the query below?
SELECT changehistory.timestamp, SUBSTRING(changedata.changes,1,1000)
FROM changehistory, JOIN changedata ON
You could use a CASE statement:
SELECT
CASE
WHEN @exp = 5 AND @exp = 10
THEN vacation + 4
WHEN @exp 2 AND @exp 5
THEN vacation + 2
ELSE vacation
END
-Original Message-
From: sakhiya [mailto:[EMAIL PROTECTED]
Sent: Thursday,
Hello -
Im trying to change the root password on a new mysql installation. Im
running 4.1.1a-alpha on WindowsXP with Apache running.
I get the error below saynig access denied. How do I get into the user
table as root if It wont allow me into the database?
Any help would be appreciated.
|
| tables_priv |
| user|
+-+
6 rows in set (0.00 sec)
-Original Message-
From: Brian Harris [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 28, 2004 2:51 PM
To: David Perron
Cc: [EMAIL PROTECTED]
Subject: Re: Trying to change the root pwd
Hey David
I'm
Does anyone know of a function to employ when retrieving a LONGBLOB column -
Im creating an ad hoc query and
would like to see the data in text format.
Im looknig for the function that will allow me to export the database
structure into a static file, without the actual data.
I would like to create an ERD diagram with the output file.
David
32 matches
Mail list logo