Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cant SELECT after large import

Status
Not open for further replies.

thompom

Technical User
Dec 4, 2006
395
GB
Hi,

Yesterday night I imported 20K records into mysql DB.
Today when i try to select new records added - they dont show

Anything I can do?

cheers MG
 
Anything I can do?

Yes, you can provide more information!

Why are you confident that the 20K records were successfully imported into the MySQL DB?

How were they imported?

Show a typical example of one of the records that was imported.

What is the SELECT statement you used?

Why are you confident that the SELECT statement was applied to the table / database you imported the data into?

Andrew
 
Hi - thanks for your reply

Why are you confident that the 20K records were successfully imported into the MySQL DB?
SQLyog reported no errors

How were they imported?
Using the "import external data" tool of SQlyog from a csv file.
Note - the import included "actionid" which is an auto inc field.
I made sure the id in the table was not repeated in the import.

Show a typical example of one of the records that was imported.
Code:
insert into `ACTION` (
`actionid`, 
`typeid`, 
`notes`, 
`eventid`, 
`actiondate`, 
`userid`, 
`customtype`, 
`eventstocklinkid`, 
`actiontypeid`, 
`done`, 
`useridissued`, 
`username`, 
`lastedit`, 
`lastedituser`, 
`userdeptlinkid`, 
`dealid`, 
`stackid`, 
`quoteid`, 
`dwimport`) 
values(
'68338',
'1',
NULL,
'55338',
'2012-09-28 00:00:00',
'274',
'0',
'0',
'0',
'0',
'0',
'jacr',
NULL,
NULL,
'16',
'0',
'0',
'0',
'44358'
);

What is the SELECT statement you used?
Code:
SELECT * FROM ACTION 
WHERE DATE(actiondate) = '20120928'
This produces some results but not the record above AND any new records inserted from web app acnnot be found using SELECT

Why are you confident that the SELECT statement was applied to the table / database you imported the data into?
Am using sqlyog explorer and the db shows at top

hope ok and thanks for your help
 
I am not familiar with SQLyog so I took a quick look at their website. Apparently it comes in three editions: Ultimate, Enterprise and Professional. Which one do you have? I ask that because in the features matrix, the ability to "Import External Data" is not available in the Professional edition.

I would have thought that SQLyog would display a message like "20,000 records successfully imported". Did SQLyog report something similar? If no message at all was output by SQLyog then I would be very doubtful that anything got imported - but I don't know SQLyog.

Have you successfully imported data into your MySQL tables using SQLyog previously?



Andrew
 
SQL Yog issues a warning if the option is not available.

I'm leaning towards an incorrect insertion of data.

I ran your insert statement in SQL Yog, and then ran your select in Sql yog. and both completed successfully returning the inserted row in the select.

What happens if you use the actionid instead of the date?


Code:
[b][COLOR=#0000FF]SELECT[/color][/b] [COLOR=#990000]*[/color] [b][COLOR=#0000FF]FROM[/color][/b] [COLOR=#FF0000]`ACTION`[/color] [b][COLOR=#0000FF]WHERE[/color][/b] actionid [COLOR=#990000]=[/color] [COLOR=#993399]55338[/color]

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
Hi - thanks for your replies

Towerbase - the import is successful (SQLyog Ultimate)

SQLyog Job Agent Version 9.20 Copyright(c) Webyog Softworks Pvt. Ltd. All Rights Reserved.
Job started at Tue Oct 02 20:16:22 2012
DBMS Information: TEXT
Importing table schema: action... Successful...
Importing table foreign keys: action...
Importing table data: action...
19339 rows transferred!
Successful...
Total time taken - 2 sec(s)

Vacunita - The select by actionid works fine
 
Hi - many apologies, was an issue with datetime format from excel -
even though it didnt error on import and looked fine.
This also stopped new records added by web app from showing on SELECT
Thankyou for all ideas - made me look at CSV again
 
Glad you sorted it out.

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top