Problems using date with MySQL 4.1.0 - Alpha
I am currently using MySQL 4.1 Win2K version along ODBC 3.5.1 Driver I am having trouble using the following LOAD DATA INFILE to import a txt, comma delimited file into to a Mysql Table. Actually the only problem is the date field loading into mysql 4.1. I have defined the field as a date, datetime and timestamp. Where I am having trouble is the date in the second group below. I am receiving the information as 12/06/2003. All fields load fine with the exception of the 12/06/2003 field. All I get is is -00-00 00:00:00 for the value of this field. Can anyone point me to the right direction on how I can successfully load the date with the 12/06/2003 format without getting -00-00 00:00:00 everytime. Thanks for your help and time. Lenny Sorey LOAD DATA INFILE d:/mydir/myfile.Tmp INTO TABLE dealervehicle FIELDS TERMINATED BY ',' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n'; (CIDLOTD,CVIN,CSTOCKNUM,CDISPOSITI,CMAKE,CMODEL,CYEAR,CMILEAGE,CBODYTYPE,CENGINE,CENGINESIZ,CINDUCTION,CTRANSMISS, CCOLOR,CPRICE,CCOST,CWARRANTY,CWARRANTYT,FWARRANTY,FWARRANTYT,FWARRANTYC,CPC_LABOR,CPC_PARTS,CWARRMONTH,C WARRMILES,CMANUF_MON,CMANUF_YEA,CSERVICEAG,DDATE_IN,DDATE_REMO,O1,O2,O3,O4,O5,O6,O7,O8,O9,O10,O11,O12,O13,O14,O15,O1 6,O17,O18,O19,O20,O21,O22,O23,O24,O25,O26,O27,O28,O29,O30,O31,O32,O33,O34,O35); Dealer Name,2FMZA5145YBC70950,6641,A,FORD,Windstar LX,2000,65969,MINI VAN,V-6,3.8,SEQUENTIAL-PORT F.I.,AUTOMATIC WITH OVERDRIVE,Red, , ,Y,L,C1, , ,50,50,90,3000,08,1999,Y,12/06/2003,/ /,POWER STEERING,POWER BRAKES,POWER DOOR LOCKS,POWER WINDOWS,AM/FM STEREO RADIO,CASSETTE PLAYER,RADIAL TIRES,GAUGE CLUSTER,TRIP ODOMETER,TACHOMETER,AIR CONDITIONING,TILT STEERING WHEEL,CRUISE CONTROL,TINTED GLASS,DRIVER SIDE AIR BAG,PASSENGER SIDE AIR BAG,RECLINING SEATS,,ALLOY WHEELS,BODY-SIDE MOLDING,LUGGAGE RACK,CLOCK,INTERVAL WIPERS,REAR DEFROSTER,REAR WINDOW WIPER,CONSOLE,CARPETING,DAY/NIGHT LEVER,DUAL SPORT MIRRORS,DRIVER SIDE REMOTE MIRROR,FRONT BUCKET SEATS,CLOTH UPHOLSTERY,THIRD SEAT,CENTER ARM REST,COURTESY LIGHTS -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Bug, Limitation of MySQL or ?
I'm going to try this one more time. Just trying to keep my question at the top so someone will read it and possibly respond. Sorry to be a bother, but I've been working on this problem for three days with no succcess. I store the result(s) of a multiple select listbox in a MySQL version 4.0.2 varchar field i.e. 2,3,4,5,6 as a selection example. - these results are stored in the table category under the field name category_common. What I'm trying to do is to use the the the above results in a query such as follows: The column content.content_common has the values of 2 and 3 and 4 in different rows. I've enclosed category.category_common in parentheses () which as I understand should treat category.category_common as a list. My question is the following query something that MySQL can render regarding the content.content_common IN (category.category_common) statement or am I doing something very wrong? Once again, when I manually type in (2,3,4) in place of (category.category_common), I get the right answer. How can I convert (category.category_common) into a list MySQL can understand? * Select content_title, content_category, content_order, content_name1 from content, category where category.category_id = 'Intbk' AND content.content_common IN (category.category_common) Order by content.content_order My platform is as follows: W2k professional, tomcat 4.1.12, J2SDK 1.4.1, MySQL 4.0.2, mysql-connector-java-3.0.0 Once again, Thanks for any help. Lenny Sorey - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Help! Converting varchar to List
Sorry to be a bother, but I've been working on this problem for three days with no succcess. I store the result(s) of a multiple select listbox in a MySQL version 4.0.2 varchar field i.e. 2,3,4,5,6 as a selection example. - these results are stored in the table category under the field name category_common. What I'm trying to do is to use the the the above results in a query such as follows: The column content.content_common has the values of 2 and 3 and 4 in different rows. I've enclosed category.category_common in parentheses () which as I understand should treat category.category_common as a list. My question is the following query something that MySQL can render regarding the content.content_common IN (category.category_common) statement or am I doing something very wrong? Once again, when I manually type in (2,3,4) in place of (category.category_common), I get the right answer. How can I convert (category.category_common) into a list MySQL can understand? * Select content_title, content_category, content_order, content_name1 from content, category where category.category_id = 'Intbk' AND content.content_common IN (category.category_common) Order by content.content_order My platform is as follows: W2k professional, tomcat 4.1.12, J2SDK 1.4.1, MySQL 4.0.2, mysql-connector-java-3.0.0 Once again, Thanks for any help. Happy Holidays, Lenny Sorey - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Extracting information from a list contained in Varchar file
I have a question on the following query statement: SELECT content_title, content_category, content_order, content_name1 FROM content INNER JOIN category ON content.content_category = category.category_id WHERE content_category = 'Intbk' Union Select content_title, content_category, content_order, content_name1 from content, category where category.category_id = 'Intbk' AND content.content_common IN (category.category_common) Order by content.content_order ** The two field that are giving me trouble are the one above that are in the color maroon. 1. category.category_common is a Varchar defined field in the table category containing the data - 2,3 2. content.content_common is a int defined field in the table content. Content.content_common contains multiple rows containing either 2 or 3. The problem that I am having is that the content.content_common IN (category.category_common) portion in the above query is only returning those data fields from the content.content_common column that contain the number 2. Content.content_common is not returning any of the four content.content_common data field that contain a 3. I know that I cannot use a sub-select with this version of MySql. Anyone have any ideas what I'm doing wrong? Thanks In Advance. Lenny Sorey My platform is as follows: Win 2k Professional, MySQL-Max 4.0.3, MyODBC-3.51.03 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Extracting information from a list contained in Varchar file
I have a question on the following query statement: SELECT content_title, content_category, content_order, content_name1 FROM content INNER JOIN category ON content.content_category = category.category_id WHERE content_category = 'Intbk' Union Select content_title, content_category, content_order, content_name1 from content, category where category.category_id = 'Intbk' AND content.content_common IN (category.category_common) Order by content.content_order ** The two field that are giving me trouble are the one above that are in the color maroon. 1. category.category_common is a Varchar defined field in the table category containing the data - 2,3 2. content.content_common is a int defined field in the table content. Content.content_common contains multiple rows containing either 2 or 3. The problem that I am having is that the content.content_common IN (category.category_common) portion in the above query is only returning those data fields from the content.content_common column that contain the number 2. Content.content_common is not returning any of the four content.content_common data field that contain a 3. I know that I cannot use a sub-select with this version of MySql. Anyone have any ideas what I'm doing wrong? Thanks In Advance. Lenny Sorey My platform is as follows: Win 2k Professional, MySQL-Max 4.0.3, MyODBC-3.51.03 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
How to convert Varchar data field into a list
After thinking about some, I think I can ask my question in a clean manner. How do I convert a Varchar data field into a list? Can someone tell me what I'm doing wrong? I have a query see below where the value (a varchar) of category.category_common is - 2,3 I add the ( ) in the query below to convert category.category_common into a list item. The query below will only locate the first item in category.category_common which is 2 * Select content_title, content_category, content_order, content_name1 from content, category where category.category_id = 'Intbk' AND content.content_common IN (category.category_common) Order by content.content_order * The query below works, when I manually add the list lite (2,3). Select content_title, content_category, content_order, content_name1 from content, category where category.category_id = 'Intbk' AND content.content_common IN (2,3) Order by content.content_order - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Command Line Tool
I'm having a bit of a problem trying to get MySQL version 4.0.1-alpha-max-nt binary version to accept The Command - Line Tool to run a script to create a table. My operating system is Windows 2000 Professional. I can connect with MyODBC-3.51.02.exe without any problem and run successful queries. I am using the model example from chapter 4.8.2 The Command-line Tool. I am trying to create a table in the test database example in MySQL I am logged in correctly and using the test database that is created when MySQL is installed as best as I can tell by reviewing the command line mysql status. I am issuing the command line statement at the mysql prompt: mysql test create.sql; I get the following mysql error: ERROR 1064 You have an error in your SQL near 'mysql test create1.sql' at line 1 Basically, I have a script named create1.sql with the following syntax: CREATE TABLE Names ( NameID int(11) NOT NULL auto_increment, FirstName varchar(30) NOT NULL default '', LastName varchar(30) NOT NULL default '', PRIMARY KEY (NameID), KEY idx_Names_LastFirst (LastName,FirstName) ) TYPE=MyISAM; INSERT INTO Names VALUES (1,'Morton','Salter'); INSERT INTO Names VALUES (2,'Jimi','Filmore'); INSERT INTO Names VALUES (3,'Eustace','Shoe'); INSERT INTO Names VALUES (4,'Archy','Roche'); INSERT INTO Names VALUES (5,'Catherine','LaGrande'); Anyone got any suggestions? Thanks In Advance Lenny R. Sorey FatDot.com [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Fw: Command Line Tool
No problem Paul, I understood what you meant. Lenny Sorey - Original Message - From: Paul DuBois [EMAIL PROTECTED] To: Lenny Sorey [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, April 05, 2002 11:17 AM Subject: Re: Command Line Tool At 10:43 -0600 4/5/02, Paul DuBois wrote: At 10:29 -0600 4/5/02, Lenny Sorey wrote: I'm having a bit of a problem trying to get MySQL version 4.0.1-alpha-max-nt binary version to accept The Command - Line Tool to run a script to create a table. My operating system is Windows 2000 Professional. I can connect with MyODBC-3.51.02.exe without any problem and run successful queries. I am using the model example from chapter 4.8.2 The Command-line Tool. I am trying to create a table in the test database example in MySQL I am logged in correctly and using the test database that is created when MySQL is installed as best as I can tell by reviewing the command line mysql status. I am issuing the command line statement at the mysql prompt: mysql test create.sql; That's your problem. Issue that command from the DOS prompt. Having just been castigated in private mail for being snippy in my response, I'll amend that to: That's the problem. Issue that command from the DOS prompt. I get the following mysql error: ERROR 1064 You have an error in your SQL near 'mysql test create1.sql' at line 1 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php