Jump to content

natnat

Members
  • Posts

    7
  • Joined

  • Last visited

natnat's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. natnat

    updating datatypes?

    okI'm researching those things now. I guess I'll have to see what happens when I finish the general sql queries and incorporate it to something else. wish me luck!!
  2. natnat

    updating datatypes?

    just testing..so I'm pretty sure if I do use this for production, the final product will have a GUI and its probably going to be webbased for our company's intranet which I to be honest dont know how to do exactly
  3. natnat

    updating datatypes?

    how would I do that?I am doing everything from the command prompt so I dont have an interface I'm looking at or using.do you mean that I need to write some sort of code that says..if char entered over 5 numbers, write error message..?something like that?
  4. natnat

    updating datatypes?

    I am trying to find the syntax used to chnge a datatype. The reason why is because i had a datatype that is only to allow up to 5 numbers to be entered. the datatype i used is varchar(5). when I test it, if more than 5 numbers are entered, it takes them anyway and just truncates the numbers entered after the 1st five.I'm thinking that if I change my datatype to int(5) instead, that will correct the problem. Am i right? and if so.. does anyone know the correct syntax to change it, or where i can find it?
  5. I did that and it didnt work.My manger came over though and told me I needed to FTP the file to the correct directoryso i did that, i got a message saying I had syntax errors but it works now.thanks though
  6. well, what I typed in the 1st post is the line of code. I'm using this at the DOS prompt..thats the only way my project manager will allow for now.but again it is... mysql> load data local infile "hsiaTest.txt" into table test_one;ERROR 2 (HY000): File 'hsiaTest.txt' not found (Errcode: 2)mysql> load data local infile "hsiaTest.txt" into table test_one;ERROR 2 (HY000): File 'hsiaTest.txt' not found (Errcode: 2)mysql> load data local infile "hsiaTest.txt" into table test_one;ERROR 2 (HY000): File 'hsiaTest.txt' not found (Errcode: 2)mysql> load data local infile "hsiaTest.txt" into table test_one;ERROR 2 (HY000): File 'hsiaTest.txt' not found (Errcode: 2)mysql> mysql> load data local infile "hsiaTest.txt" into table test_one;ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql> load data local infile "hsiaTest.txt" into table test_one' at line 1mysql>the file is just a dummy test file i created in notepad with values formated for this table:mysql> describe test_one;+-----------+-------------+------+-----+---------+-------+| Field | Type | Null | Key | Default | Extra |+-----------+-------------+------+-----+---------+-------+| name | varchar(20) | YES | | NULL | || title | varchar(20) | YES | | NULL | || extension | varchar(5) | YES | | NULL | |+-----------+-------------+------+-----+---------+-------+3 rows in set (0.01 sec)
  7. I have just started using my sql and everything was working fine with querys, creating tables and such until i tried to create a file with values in it in notepad, save it as hsiaTest.txt, and load it into my table with this code:mysql> load data local infile "hsiaTest.txt" into table test_one;it returns...ERROR 2 (HY000): File 'hsiaTest.txt' not found (Errcode: 2)I have the file saved to the same drive where the mysql database is running from so whats the problem?
×
×
  • Create New...