Re: Printing

2007-05-08 Thread Stephen Cook
I think that offering some sort of feedback other than result sets would be nice for debugging. Peter Brawley wrote: I hope this isn't a silly question, or something covered in a FAQ. . . but is there any reason to not have at least some primitive print formatting commands in MySQL? Or am

Re: Enforcing Data Format

2007-05-03 Thread Stephen Cook
I'd go the other way and use a trigger to validate the data, and roll back the transaction if it isn't in valid format (assuming you are using transactions). This way, ANY app that puts data in that field gets the validation. An error in an application or typing by someone who has direct table

Re: Using replace with New Lines

2007-03-27 Thread Stephen Cook
I always go with REPLACE(REPLACE(STRING, '\n', ''), '\r', ''), since depending on where your data came from there may be one or the other, or both. Although if there is a shorthand/more efficient way I'd love to hear it. [EMAIL PROTECTED] wrote: Ok.. I found the problem.. I needed to add a

Re: SPAM ?

2007-03-25 Thread Stephen Cook
http://lists.mysql.com/[EMAIL PROTECTED] that link ought to help you. Jacques Brignon wrote: Hi, I keep receiving this message by several dozens each day, how can this be stopped? Regards Jacques -Message d'origine- De : Jerry Schwartz [mailto:[EMAIL PROTECTED] Envoyé : jeudi

Re: leading the technological bandwagon

2006-12-20 Thread Stephen Cook
You should send that one to The Daily WTF... http://thedailywtf.com/ Jay Blanchard wrote: [snip] I recently last week Had and experience with an Very small Company, where as they had around 15 Machines all hooked Star topology and a central iis ASP Web server that only showed the date, and a

Re: Grant privs to multiple tables at once?

2006-10-13 Thread Stephen Cook
You can use the INFORMATION_SCHEMA.TABLES view to generate the GRANT statements for you. Write a query along these lines: SELECT CONCAT('GRANT SELECT ON test.', TABLE_NAME, ' to ''foouser'';') FROM INFORMATION_SCHEMA.TABLES WHERETABLE_SCHEMA = 'test' AND TABLE_NAME LIKE

Re: Outputting text in a

2006-08-23 Thread Stephen Cook
There apparently isn't a PRINT or RAISERROR function like there is in SQL Server, I've asked about this before. I created a stored procedure to dump debug text into a table (which is timestamped) and another to output the rows in there in a SELECT. It isn't the same but it's something. Dan

Re: PRINT statement?

2006-05-13 Thread Stephen Cook
that is what I get paid for). I'm not here to discuss people's religious beliefs, I'm here to learn what MySQL can and can not do. Peter Brawley wrote: Stephen Cook wrote: There are such things as extensions to the standard, and many languages besides BASIC that have the ability to output

Re: PRINT statement?

2006-05-12 Thread Stephen Cook
There are such things as extensions to the standard, and many languages besides BASIC that have the ability to output a character string. No need to be snippy. I will look into the --silent option, thanks! Peter Brawley wrote: Stephen Cook wrote: I appreciate it but SELECT isn't quite what

Re: PRINT statement?

2006-05-11 Thread Stephen Cook
- Original Message - From: Quentin Bennett [EMAIL PROTECTED] To: Rhino [EMAIL PROTECTED]; Stephen Cook [EMAIL PROTECTED] Cc: MySQL List mysql@lists.mysql.com Sent: Wednesday, May 10, 2006 11:59 PM Subject: RE: PRINT statement? From Transact-SQL Help file: PRINT Returns a user-defined message

Re: PRINT statement?

2006-05-10 Thread Stephen Cook
I've started using the SELECT with no other clauses but I am still curious about a PRINT-like command. It is for SQL scripts. Rhino wrote: - Original Message - From: Stephen Cook [EMAIL PROTECTED] To: MySQL List mysql@lists.mysql.com Sent: Sunday, May 07, 2006 3:53 AM Subject: PRINT

PRINT statement?

2006-05-07 Thread Stephen Cook
Is there a statement similar to PRINT in T-SQL (MicroSoft SQL Server)? It would be handy to debug some scripts. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Accountability with MySQL

2006-03-15 Thread Stephen Cook
A commonly used example (at least at my last 3 jobs) would be a table of demographics for people (whether they be employees, clients, whatever). You can have one table and allow NULLs for some of the fields (id, LastName, FirstName, MiddleInitial, Title, NameSuffix, AddressLine1,

DROP DATABASE doesn't actually drop the database?

2006-03-13 Thread Stephen Cook
I am scripting out the creation of a database so I can make changes and then run the script to generate a clean copy (by running it in MySQL Query Browser). The script DROPs all the tables, then CREATEs them again along with all the indices and whatnot. However, if I run the script after having

Re: DROP DATABASE doesn't actually drop the database?

2006-03-13 Thread Stephen Cook
a database by mysqldump db_name db_name.sql There are many handy options to mysqldump as --add-drop-table and -all that you should consider to use You then can manually update the dump files in a text editor. mysql db_name db_name.sql recreates the dumped data with all tables. Andy Stephen

Re: Strange behavior with integer unsigned type...

2005-12-30 Thread Stephen Cook
Maybe it is because I am a programmer, but (unsigned) 0 - 1 = 4294967295. What's the big deal? Gleb Paharenko wrote: Hello. That seems like a bug: http://bugs.mysql.com/bug.php?id=14543 Marko Domanovic wrote: mysql 5.0.15-standard UPDATE table SET fieldname = fieldname-1

Re: [OT] SPAM

2005-12-15 Thread Stephen Cook
I got one from mysql@lists.mysql.com, and one from [EMAIL PROTECTED] And my filters remove anything that isn't from one of the mailing lists I subscribe to. Daniel Kasak wrote: Stephen Cook wrote: What's the deal with SPAM on the list? I don't see any. Maybe my spam filter is better

[OT] SPAM

2005-12-14 Thread Stephen Cook
What's the deal with SPAM on the list? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Cannot start MySQL under Win2000

2005-12-02 Thread Stephen Cook
You must not install 5.0 over 4.1, put it somewhere else. Also, instead of naming the service MySQL both times, call it something else (i.e. MySQL41 and MySQL50). If you use the Windows installer distribution, it is one of the options; if you are doing it by hand then you already know how to

Re: Windows - logging into MySQL

2005-11-30 Thread Stephen Cook
His answer was correct, and somewhat politer than RTFM. As for finding your own damn answers, see again Mr. Green's original reply. Beauford wrote: Sorry, but I don't take kindly to idiots. I don't care if he's gods gift to MySQL. If there isn't enough info for him to give an informed

Re: MySQL vs XML

2005-07-30 Thread Stephen Cook
MySQL is a relational database. XML is a text file. the biggest difference is that MySQL will let you organize, sort, match/link (joins), and otherwise manipulate the data you have. XML is just text with tags in a heirarchy; anything other than reading it in a text editor will take

Re: Which Engine to use...

2005-07-21 Thread Stephen Cook
it is because of the dollar sign that it works so much quicker. Scott Hamm wrote: I'm now trying to learn engines in MySQL. When I migrated from M$ SQL to MySQL to learn the migration process and executed the following: SELECT * FROM QA LEFT JOIN Batch ON Batch.QAID=QA.ID LEFT JOIN

Re: Storing huge amount of binary data

2005-07-11 Thread Stephen Cook
Per Jessen wrote: 3. Again, as you can understand, I want to minimize the cost here. If you don't think I can use mysql, do you think Microsoft SQL server is good enough for this task? I don't think so, no. what are you basing this on? SQL Server is a truly great database package, don't

Re: offer a solution ?

2005-07-02 Thread Stephen Cook
depending on what you use this information for, you might want to keep two tables, one with the current information, and one of the history. it would keep the current one relatively small, but allow for looking up historical data if necessary. nephish wrote: Hey there, i have been messing