Re: Is there a way ?

2009-08-17 Thread Martijn Tonies
Hello Miles, I'm a little rusty in my SQL statements, and I'm not all that certain that this can be done. IF I have a field with the contents like: "http://beta.somedomain.com/url/url/url=2"; where 2 is the record ID value. And I need to change the contents of That is rather "unfortuna

Re: Is there a way ?

2009-08-16 Thread Johnny Withers
UPDATE table SET col1=REPLACE(col1,'beta.','www.'); Would do what you would need. On Sun, Aug 16, 2009 at 11:14 AM, m i l e s wrote: > Hi, > > I'm a little rusty in my SQL statements, and I'm not all that certain that > this can be done. > > IF I have a field with the contents like: > > "http:/

Is there a way ?

2009-08-16 Thread m i l e s
Hi, I'm a little rusty in my SQL statements, and I'm not all that certain that this can be done. IF I have a field with the contents like: "http://beta.somedomain.com/url/url/url=2"; where 2 is the record ID value. And I need to change the contents of that field to read: "http://www.so

Is there a way to disable SET PASSWORD for selected users

2009-07-09 Thread Gary Smith
I would like to prevent users from changing their passwords unless they have grant permission. Is this possible? We have an set of stored procedures for managing users/databases for a single signon project that we are working on. The problem is if a user connects directly to the database usin

Is there a way to tell the type of a value?

2007-06-21 Thread Baron Schwartz
I'm trying to clarify some type-casting behavior and it would help if I could examine the type of certain things: user variables, CURRENT_DATE, expressions like 5+'0'. Is there such a function or operator? I can't find one. -- Baron Schwartz http://www.xaprb.com/ -- MySQL General Mailing Lis

Re: Is there a way to load non-native Date type with LOAD DATA

2006-09-03 Thread Brad Jahnke
> 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? If you are using MySQL 5.0.3 or greater, you

Re: Is there a way to load non-native Date type with LOAD DATA

2006-09-03 Thread Chris W
David Perron wrote: 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? in VI the following should work depending

Re: Is there a way to load non-native Date type with LOAD DATA

2006-09-03 Thread Chris Jones
Use a command line tool to change the date. I am only familiar with perl and it would be a very short script to change to -MM-DD. At 10:48 PM 9/2/2006, David Perron wrote: 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

Is there a way to load non-native Date type with LOAD DATA

2006-09-02 Thread David Perron
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

Re: is there a way to optimize like '%..%' searches ?

2006-07-01 Thread Asif Lodhi
What about partitioning the database? On 7/1/06, Dan Buettner <[EMAIL PROTECTED]> wrote: Wow, that is a tough one. My question would be, how often is older data really accessed? Could you start incorporating a default date range like "past 3 months" or "past 1 year" into all searches, but al

Re: is there a way to optimize like '%..%' searches ?

2006-06-30 Thread Dan Buettner
Wow, that is a tough one. My question would be, how often is older data really accessed? Could you start incorporating a default date range like "past 3 months" or "past 1 year" into all searches, but allow people to override it if needed? Then if you add an index on the timestamp column it wou

Re: is there a way to optimize like '%..%' searches ?

2006-06-30 Thread Martin Jespersen
It's basically a log that people needs to be able to search with wildcards in... the log grows many thousand records per day and never gets smaller, so searches just gets slower and slower. There is a sort field, the timestamp which is used in the searches, but it only makes the searches lsower

Re: is there a way to optimize like '%..%' searches ?

2006-06-29 Thread Dan Buettner
Bummer, Martin. What more can you tell us about your specific application? What are you storing and searching on, exactly? Any chance you can filter on another column to reduce the number of records that need a string search? Dan On 6/28/06, Martin Jespersen <[EMAIL PROTECTED]> wrote: I was

Re: is there a way to optimize like '%..%' searches ?

2006-06-28 Thread Martin Jespersen
I was too fast there it seems fulltext searches doesn't help after all since i can't use leading wildcards to words :( too bad i loved the speed :/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: is there a way to optimize like '%..%' searches ?

2006-06-28 Thread Martin Jespersen
Indeed fulltext searches was the cure i was looking for. Queries went from over 116 seconds to less than half a second thx for the tip ;) Dan Buettner wrote: Martin, currently there is not a way to optimize that particular type of query. You might consider changing to fulltext indexes and se

Re: is there a way to optimize like '%..%' searches ?

2006-06-28 Thread Peter Van Dijck
Also, perhaps this is good enough for your situation: like 'some%thing%' as opposed to like '%some%thing%' in this case, mysql can use an index on that column and filter out everything that doesn't start with "some". It's a start at least. Peter On 6/28/06, Dan Buettner <[EMAIL PROTECTED]> wrot

Re: is there a way to optimize like '%..%' searches ?

2006-06-28 Thread Dan Buettner
Martin, currently there is not a way to optimize that particular type of query. You might consider changing to fulltext indexes and searches instead, as it could be faster, but it is a slightly different animal from LIKE & so may not fit your needs. http://dev.mysql.com/doc/refman/4.1/en/fulltext

is there a way to optimize like '%..%' searches ?

2006-06-28 Thread Martin Jespersen
Hey all i am running mysql 4.1.20. I have a table with about 2.5 million records and i have to do queries on it that looks something like: select * from table where field1 like '%some%thing%' order by field2 This is ofcourse very slow since it refuses to use indexes... i have fairly large re

RE: Is there a way

2005-05-17 Thread Berman, Mikhail
Atle, Thank you for your help Mikhail Berman Ives Inc (508)476-7007 ext.27 [EMAIL PROTECTED] -Original Message- From: Atle Veka [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 17, 2005 1:16 PM To: Berman, Mikhail Cc: mysql@lists.mysql.com Subject: Re: Is there a way SELECT ... INTO

Re: Is there a way

2005-05-17 Thread Atle Veka
SELECT ... INTO OUTFILE 'filename' export_options': http://dev.mysql.com/doc/mysql/en/select.html The 'export_options' are the same as this syntax: http://dev.mysql.com/doc/mysql/en/load-data.html That may work for you. Atle - Flying Crocodile Inc, Unix Systems Administrator On Tue, 17 May 200

Is there a way

2005-05-17 Thread Berman, Mikhail
Hello everyone, I am looking for a way to dump a number of tables from mysql Ver 14.7 Distrib 4.1.9, for sun-solaris2.8 (sparc) into tabulated (csv) files with tables's column names being on the top of each data column, something like: IDColumn Name 1Column Name 2 1

Re: Group By - Is there a way to set which rows values are used for the fields not in the Group By clause?

2005-04-19 Thread Rich Carr
lcount, itemname from viewvisitor where ownerid = 2 GROUP BY concat( app, itemid ) ORDER BY totalcount; Rich Carr wrote: >Is there a way to set which rows values are used by the GROUP BY clause for >the fields that are not in the GROUP BY clause? > >In this following select statement the

Re: Group By - Is there a way to set which rows values are used for the fields not in the Group By clause?

2005-04-18 Thread Vivian Wang
(lastviewtime), you can do this, select app, itemid, ownerid, visitorid, vusername, max(lastviewtime), sum(viewcount) AS totalcount, itemname from viewvisitor where ownerid = 2 GROUP BY concat( app, itemid ) ORDER BY totalcount; Rich Carr wrote: Is there a way to set which rows values are used by the GROUP

Re: Is there a way to spell check a DB/column?

2005-04-14 Thread gerald_clark
Ludovic Coumétou wrote: Hello, I have been googling and asking on several forums with no luck, so I'm coming here for the ultimate answer :) eheh Is there a way to spell check a mysql column (or at least table)? Thanks in advance Ludovic Several. 1. Dump - spell check - reload. 2. Wr

Is there a way to spell check a DB/column?

2005-04-14 Thread Ludovic Coumétou
Hello, I have been googling and asking on several forums with no luck, so I'm coming here for the ultimate answer :) eheh Is there a way to spell check a mysql column (or at least table)? Thanks in advance Ludovic -- MySQL General Mailing List For list archives: http://lists.mysql.com/

Re: Group By - Is there a way to set which rows values are used for the fields not in the Group By clause?

2005-04-12 Thread Rich Carr
| >+--++------+ > >or GROUP_ROW(cols,sortby=) > >-- More sillyness >SELECT id, group_row(child_id,type,sortby=rand()) >FROM chi2 GROUP BY id; > >Just an idea. > >Dan. > >On Mon, 11 Apr 2005, Rich Carr wrote: > >>Is there a way to set which ro

Re: Group By - Is there a way to set which rows values are used for the fields not in the Group By clause?

2005-04-12 Thread Dan Bolser
t;+--++--+ >| 1 | 1 | 0 | >| 5 | 2 | 2 | >+--++------+ > >or GROUP_ROW(cols,sortby=) > >-- More sillyness >SELECT id, group_row(child_id,type,sortby=rand()) >FROM chi2 GROUP BY id; > >Just an idea. > >Dan. > >On Mon, 11 Apr

Re: Group By - Is there a way to set which rows values are used for the fields not in the Group By clause?

2005-04-12 Thread Dan Bolser
id, group_row(child_id,type,sortby=rand()) FROM chi2 GROUP BY id; Just an idea. Dan. On Mon, 11 Apr 2005, Rich Carr wrote: >Is there a way to set which rows values are used by the GROUP BY clause >for the fields that are not in the GROUP BY clause? > In this following select statement

Group By - Is there a way to set which rows values are used for the fields not in the Group By clause?

2005-04-11 Thread Rich Carr
Is there a way to set which rows values are used by the GROUP BY clause for the fields that are not in the GROUP BY clause? In this following select statement the group by and order work but the value of the lastviewtime field is not the value of the most recent datetime row. Is there any

RE: Is there a way to use LIMIT in both UNION ALL statement and t hen ORDER?

2005-03-28 Thread Tom Crimmins
On Monday, March 28, 2005 21:07, Homam S.A. wrote: > MySQL seems to let me use the LIMIT clause in both > parts of a UNION ALL query, but as soon as I add an > ORDER BY CLAUSE, it gives me a syntax error. > > For example, this query executes fine: > > SELECT * FROM A WHERE X = 1 LIMIT 1000 > UN

Re: Is there a way to use LIMIT in both UNION ALL statement and then ORDER?

2005-03-28 Thread Homam S.A.
Nevermind, I found in the documentation that I need to paranthesize the SELECT parts of the UNION ALL, like this: (SELECT X, Y FROM A WHERE W = 1 LIMIT 1000) UNION ALL (SELECT X, Y FROM B WHERE W = 1 LIMIT 1000) ORDER BY X --- "Homam S.A." <[EMAIL PROTECTED]> wrote: > MySQL seems to let me use

Is there a way to use LIMIT in both UNION ALL statement and then ORDER?

2005-03-28 Thread Homam S.A.
MySQL seems to let me use the LIMIT clause in both parts of a UNION ALL query, but as soon as I add an ORDER BY CLAUSE, it gives me a syntax error. For example, this query executes fine: SELECT * FROM A WHERE X = 1 LIMIT 1000 UNION ALL SELECT * FROM B WHERE Y = 1 LIMIT 1000 But this returns an e

Fulltext in boolean mode and ordering. Is there a way to avoid filesorting ?

2005-03-02 Thread CheHax
e results ordered the way I want to. And the question is : Is there a way to avoid this filesort, or a way to sort my results by relevance even in boolean mode. A way, or a trick ;) Thanks ! HMax -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Re: Is there a way to make mysql sgml aware?

2004-05-05 Thread Paul DuBois
At 11:48 -0700 5/5/04, Jeremy Zawodny wrote: On Wed, May 05, 2004 at 02:00:31PM -0300, Leonardo Javier Belén wrote: Hi folks, Is there a way to make mysql sgml aware or any plan to do it in the near time? I think the answer is "no" but I don't really know what that question

Re: Is there a way to make mysql sgml aware?

2004-05-05 Thread Jeremy Zawodny
On Wed, May 05, 2004 at 02:00:31PM -0300, Leonardo Javier Belén wrote: > Hi folks, > Is there a way to make mysql sgml aware or any plan to do it in the near > time? I think the answer is "no" but I don't really know what that question means. Can you elaborate? Jere

Is there a way to make mysql sgml aware?

2004-05-05 Thread Leonardo Javier Belén
Hi folks, Is there a way to make mysql sgml aware or any plan to do it in the near time? Leonardo J. Belen mysql query sql mysql query sql mysql query sql mysql query sql mysql query sql mysql query sql mysql query sql mysql query sql mysql query sql mysql query sql mysql query sql mysql

Re: Is there a way to find out if a table exists?

2003-09-19 Thread Paul DuBois
At 3:37 PM -0500 9/19/03, Don Read wrote: On 19-Sep-2003 Don Read wrote: On 19-Sep-2003 Dan Anderson wrote: I am trying to make my PHP script autodetect when a table in a mySQL database exists, and when it doesn't, create it. function tableexists($tbl) { $res = @mysql_query("SELECT 1

Re: Is there a way to find out if a table exists?

2003-09-19 Thread Don Read
On 19-Sep-2003 Don Read wrote: > > On 19-Sep-2003 Dan Anderson wrote: >> I am trying to make my PHP script autodetect when a table in a mySQL >> database exists, and when it doesn't, create it. >> > > > function tableexists($tbl) { > $res = @mysql_query("SELECT 1 FROM $tbl"); > retur

Re: Is there a way to find out if a table exists?

2003-09-19 Thread Don Read
On 19-Sep-2003 Dan Anderson wrote: > I am trying to make my PHP script autodetect when a table in a mySQL > database exists, and when it doesn't, create it. > function tableexists($tbl) { $res = @mysql_query("SELECT 1 FROM $tbl"); return ($res ? true : false); } Regards, -- Don Rea

RE: Is there a way to find out if a table exists?

2003-09-19 Thread Jennifer Goodie
> Is there some way to do something like: > > SELECT * FROM tables WHERE name = "table_name"; > > And get a result I could test for truth, and thus run my script? Show tables like 'table_name'; -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:htt

Re: Is there a way to find out if a table exists?

2003-09-19 Thread Roger Baklund
* Dan Anderson > I am trying to make my PHP script autodetect when a table in a mySQL > database exists, and when it doesn't, create it. > > Is there some way to do something like: > > SELECT * FROM tables WHERE name = "table_name"; > > And get a result I could test for truth, and thus run my scrip

Is there a way to find out if a table exists?

2003-09-19 Thread Dan Anderson
I am trying to make my PHP script autodetect when a table in a mySQL database exists, and when it doesn't, create it. Is there some way to do something like: SELECT * FROM tables WHERE name = "table_name"; And get a result I could test for truth, and thus run my script? Thanks in advance, Da

Re: Is there a way to time queries?

2003-02-25 Thread Zak Greant
On Tue, Feb 25, 2003 at 04:36:23PM -0600, databarn wrote: > Folk, > > Two or three years ago, I was using ASP to access SQL Server 7 and MS > Access databases. There was a stopwatch dll made by CapRock Software > that allowed me to time various elements of my ASP scripts, > particularly the datab

Is there a way to time queries?

2003-02-25 Thread databarn
Folk, Two or three years ago, I was using ASP to access SQL Server 7 and MS Access databases. There was a stopwatch dll made by CapRock Software that allowed me to time various elements of my ASP scripts, particularly the database queries. I found several SQL problems that way, and made my qu

Re: Fulltext search: Is there a way to disable the stop words?

2002-12-30 Thread Sergei Golubchik
Hi! On Dec 28, John Porter Simons wrote: > > Any system variables I could set, or any parameters I could add to MATCH > ... AGAINST query syntax, or any plans to disable stopwords for boolean > fulltext searches in future builds? The answer to the last question is "yes, definitely", to others

Fulltext search: Is there a way to disable the stop words?

2002-12-28 Thread John Porter Simons
Does anyone know of a runtime way to disable the stopword list? I'm doing 'boolean mode' fulltext searches, but not getting any results if the term is in the compiled-in stopword list. It seems like boolean mode shouldn't even use the stopwords -- they're more for determining relevence. I tr

Hello! Is there a way to find out bad queries? Also a way for verifing tables? Tnank you

2002-02-23 Thread Victoria Reznichenko
Konstantin, Saturday, February 23, 2002, 11:49:35 AM, you wrote: KY> Hello! KY> Is there a way to find out bad query? You can read info about EXPLAIN statement (give you info about each table used in SELECT statement): http://www.mysql.com/doc/E/X/EXPLAIN.html Please, read abo

Hello! Is there a way to find out bad queries? Also a way for verifing tables? Tnank you

2002-02-23 Thread Konstantin Yotov
Hello! Is there a way to find out bad query? Also a way for verifing tables? Tnank you __ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com

Is there a way to merge/replicate between MySQL and MSSQL?

2001-01-12 Thread Wacks, David
I have a production MS SQL server and want to keep a copy on a MySQL DB on the webserver (for speed and redundancy). I have searched the archives, docs, and altavista and cannot find exactly what I am looking for. Ultimately, I would like to be able to have the databases merge/replicate between