|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
MS SQL "CREATE TABLE/INSERT INTO" Wierd issue - Going Bald
Yes, I am pulling my hair out on this one...................
PROBLEM:When importing from my .sql file, I loose many lines of info in my SQL table. I am using the SQL Query Analyzer to execute the file. The file contains 655,000 rows and 20 columns of data on it. When I run the full file, the system tells me it does not have enough system resources to execute the request. I broke it down just to see if it could handle a smaller file. When I create a table and have it insert 10,000 rows of info, it drops 88 lines of data. When I do the same with 120,000 rows I loose 300 rows of data. When I run it with 56,000 lines of data on the file, I loose 260 rows of data. When I do just 1,000 rows or below it is perfect. I have taken the chunks into Excel and verified the number of lines I was trying to put into the table, and everytime, it showed I had the amount of lines I thought I was trying to import. When I did a query once the table was created to see how many lines it created, I was always short. This is what my query consisted of (Let me know if this may be my issue) SELECT COUNT(*) Col_1 FROM nfo_tablename GO I even tried zero column names Any suggestions??? Am I doing something wrong here? Should I be executing the process in a different way? Here is the basic idea of what the top part of my "CREATE TABLE" file looks like (Color coded as I see it in my Query Analyzer): Code:
CREATE TABLE nfo_tablename( Col_1 Numeric, Col_2 Character(4), Col_3 Character(11), Col_4 Character(25), Col_5 Character(6), Col_6 Character(5), Col_7 Character(3), Col_8 Character(6), Col_9 Character(22), Col_10 Character(2), Col_11 Character(10), Col_12 Numeric, Col_13 Character(9), Col_14 Character(2), Col_15 Character(2), Col_16 Character(2), Col_17 Character(8), Col_18 Character(1), Col_19 Character(25), Col_20 Character(39), Col_21 varchar); insert into nfo_tablename values(1,'DSW','UNIT','002-11-K','','57C','840','674209','PCD W/OVRLY DTI/DTM','P','ESPECIAL',674856,'676--9','CO','','1','','1','0201-11','Manufacturer_Name','T'); insert into nfo_tablename values(2,'DSW','SHELF','002-07','','35C','9','09','UNEQUAL','M','',0,'','CO','','','','1','002-07','Manufacturer_Name','T'); Thank you all for your insight. Any ideas, thoughts or suggestions, would be appreciated. I really need to get this table done so I can get a couple web pages created this weekend that are due Monday. |
|
#2
|
|||
|
|||
|
Problem solved
The issue was with some of the ending rows had the ; missing, causing it to have issues. |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > MS SQL "CREATE TABLE/INSERT INTO" Wierd issue - Going Bald |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|