Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New Coder
    Join Date
    Jun 2016
    Posts
    44
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Trouble uploading CSV file to Mysql Table

    I am having trouble importing my csv to phpmyadmin for a table in a mysql DB. When I upload the file, it says it was successful, but no rows show up. When I convert the CSV file to SQL, I think I see where the problem is, but I have no idea how to correct it. This is what the first 16 rows of the SQL file looks like:

    Code:
    /* CREATE TABLE */
    CREATE TABLE MorningstarPData(
    Ticker VARCHAR(100),
    Name VARCHAR(100),
    Total_Ret_3_Mo_MoEnd_USD DOUBLE,
    Total_Ret_YTD_MoEnd_USD DOUBLE,
    Total_Ret_1_Yr_MoEnd_USD DOUBLE,
    Total_Ret_Annlzd_3_Yr_MoEnd_USD DOUBLE,
    Total_Ret_Annlzd_5_Yr_MoEnd_USD DOUBLE,
    Std_Dev_3_Yr_MoEnd_USD DOUBLE,
    Prospectus_Net_Expense_Ratio DOUBLE,
    Total_Ret_Annlzd_10_Yr_MoEnd_USD DOUBLE,
    Total_Ret__Rank_Cat_3_Mo_MoEnd VARCHAR(100),
    Total_Ret__Rank_Cat_1_Yr_MoEnd VARCHAR(100),
    Total_Ret__Rank_Cat_3_Yr_MoEnd VARCHAR(100),
    Total_Ret__Rank_Cat_5_Yr_MoEnd VARCHAR(100),
    It looks like the rows or data are being crammed into one column, hence the "VARCHAR(100)". I've already made sure none of the row headers have more than 46 characters in them. I've also removed all apostrophes and commas from the data. I have no idea what else I can do. I've tried saving to different formats, and resaving the data, but nothing works. It does seem to work when I delete the data down from 30k rows to just 700.

    Are there tools for this? or a more sure-fire process I can follow?


    This is what the first few rows of my CSV file look like when pasted into text:
    Code:
    Ticker,Name,Total_Ret_3_Mo_(Mo-End)_USD,Total_Ret_YTD_(Mo-End)_USD,Total_Ret_1_Yr_(Mo-End)_USD,Total_Ret_Annlzd_3_Yr_(Mo-End)_USD,Total_Ret_Annlzd_5_Yr_(Mo-End)_USD,Std_Dev_3_Yr_(Mo-End)_USD,Prospectus_Net_Expense_Ratio,Total_Ret_Annlzd_10_Yr_(Mo-End)_USD,Total_Ret_%_Rank_Cat_3_Mo_(Mo-End),Total_Ret_%_Rank_Cat_1_Yr_(Mo-End),Total_Ret_%_Rank_Cat_3_Yr_(Mo-End),Total_Ret_%_Rank_Cat_5_Yr_(Mo-End),Best_Fit_Alpha_3_Yr_(Mo-End),Best_Fit_R-Squared_3_Yr_(Mo-End),Best_Fit_Beta_3_Yr_(Mo-End),Turnover_Ratio_%,Sharpe_Ratio_3_Yr_(Mo-End)_USD,Morningstar_Rating_Overall,Manager_Tenure_(Average),Net_Assets_-_Average,Equity_Style_Box_(Long),Fixed_Inc_Style_Box_(Long),Morningstar_Category,Bear_Market_Rank_%_(Mo-End),Best_Fit_Index_3_Yr_(Mo-End),Global_Broad_Category_Group,Index_Fund,Enhanced_Index,Annual_Ret_2008_USD,Information_Ratio_5_Yr_(Mo-End)_USD,Downside_Capture_Ratio_5_Yr_(Mo-End)_USD,Upside_Capture_Ratio_5_Yr_(Mo-End)_USD,FundId,Annual_Ret_2007_USD,Annual_Ret_2009_USD,Annual_Ret_2010_USD,Annual_Ret_2011_USD,Annual_Ret_2012_USD,Annual_Ret_2013_USD,Annual_Ret_2014_USD,Annual_Ret_2015_USD,Annual_Ret_2016_USD,Annual_Ret_2017_USD,Tracking_Error_1_Yr_(Mo-End)_USD,Tracking_Error_10_Yr_(Mo-End)_USD,Tracking_Error_3_Yr_(Mo-End)_USD,Tracking_Error_5_Yr_(Mo-End)_USD,Downside_Capture_Ratio_3_Yr_(Mo-End)_USD,Downside_Capture_Ratio_10_Yr_(Mo-End)_USD,Downside_Capture_Ratio_15_Yr_(Mo-End)_USD,Best_3_Mo_Ret_Inception_(Mo-End)_USD,Inception_Date,Worst_3_Mo_Ret_Inception_(Mo-End)_USD,Est_Fund-Level_Net_Flow_YTD_(Mo-End)_USD,Batting_Average_3_Yr_(Mo-End)_USD,Batting_Average_5_Yr_(Mo-End)_USD,Batting_Average_10_Yr_(Mo-End)_USD,Fund_Size_USD,Volatility_Rank_%_(Mo-End),R-Squared_1_Yr_(Mo-End)_USD,R-Squared_3_Yr_(Mo-End)_USD,R-Squared_5_Yr_(Mo-End)_USD,R-Squared_10_Yr_(Mo-End)_USD,Total_Ret_Annlzd_15_Yr_(Mo-End)_USD,Std_Dev_1_Yr_(Mo-End)_USD,Std_Dev_5_Yr_(Mo-End)_USD,Std_Dev_10_Yr_(Mo-End)_USD,Asset_Alloc_Non-US_Equity_%_(Net),Asset_Alloc_US_Equity_%_(Net),Asset_Alloc_Bond_%_(Net),Asset_Alloc_Cash_%_(Net),Asset_Alloc_Other_%_(Net),Equity_Style_Large_Core_%_(Net),Equity_Style_Large_Growth_%_(Net),Equity_Style_Large_Value_%_(Net),Equity_Style_Mid_Core_%_(Net),Equity_Style_Mid_Growth_%_(Net),Equity_Style_Mid_Value_%_(Net),Equity_Style_Small_Core_%_(Net),Equity_Style_Small_Growth_%_(Net),Equity_Style_Small_Value_%_(Net),Socially_Conscious,Morningstar_Sustainability_Rating,Portfolio_Sustainability_Score,Equity_Region_Emerging_%_(Net),Equity_Region_Developed_%_(Net),Asset_Alloc_US_Bond_%_(Net),Average_Eff_Duration,Average_Eff_Maturity,Credit_Qual_AAA_%,Credit_Qual_AA_%,Credit_Qual_A_%,Credit_Qual_BBB_%,Credit_Qual_BB_%,Credit_Qual_B_%,Credit_Qual_Below_B_%,Credit_Qual_Not_Rated_%,Equity_Region_North_America_%_(Net),Equity_Region_Latin_America_%_(Net),Equity_Region_Japan_%_(Net),Equity_Region_Australasia_%_(Net),Equity_Region_Asia_dev_%_(Net),Equity_Region_Asia_emrg_%_(Net),Equity_Region_United_Kingdom_%_(Net),Equity_Region_Europe_dev_%_(Net),Equity_Region_Europe_emrg_%_(Net),Equity_Region_Africa/Middle_East_%_(Net),Equity_Country_Canada_%_(Net),Equity_Country_United_States_%_(Net),%_Asset_in_Top_10_Holdings,Equity_Region_Not_Classified_%_(Net),Total_Ret_%_Rank_Cat_YTD_(Mo-End),Total_Ret_%_Rank_Cat_10_Yr__(Mo-End),Morningstar_Analyst_Rating,Style_Consistency_(Long),Primary_Prospectus_Benchmark,Analyst_Assigned_Benchmark,Secondary_Prospectus_Benchmark,Alpha_1_Yr_(Mo-End)_USD,Alpha_3_Yr_(Mo-End)_USD,Alpha_5_Yr_(Mo-End)_USD,Alpha_10_Yr_(Mo-End)_USD,Beta_1_Yr_(Mo-End)_USD,Beta_3_Yr_(Mo-End)_USD,Beta_5_Yr_(Mo-End)_USD,Beta_10_Yr_(Mo-End)_USD,#_of_Bond_Holdings_(Long),Average_Credit_Quality,Fixed-Inc_Agency_Mortgage-Backed_%_(Net),Fixed-Inc_Asset-Backed_%_(Net),Fixed-Inc_Bank_Loan_%_(Net),Fixed-Inc_Cash_&_Equivalents_%_(Net),Fixed-Inc_Commercial_Mortgage-Backed_%_(Net),Fixed-Inc_Convertible_%_(Net),Fixed-Inc_Corporate_Bond_%_(Net),Fixed-Inc_Covered_Bond_%_(Net),Fixed-Inc_Forward/Future_%_(Net),Fixed-Inc_Government_%_(Net),Fixed-Inc_Government_Related_%_(Net),Fixed-Inc_Municipal_Taxable_%_(Net),Fixed_Non-Agen_Resid_Mo-Backed_%_(Net),Fixed-Inc_Option/Warrant_%_(Net),Fixed-Inc_Preferred_Stock_%_(Net),Fixed-Inc_Swap_%_(Net),Prospectus_Objective,Equity___Basic_Materials_%_(Net),Equity___Communication_Services_%_(Net),Equity___Consumer_Cyclical_%_(Net),Equity___Consumer_Defensive_%_(Net),Equity___Energy_%_(Net),Equity___Financial_Services_%_(Net),Equity___Healthcare_%_(Net),Equity___Industrials_%_(Net),Equity___Real_Estate_%_(Net),Equity___Technology_%_(Net),Equity___Utilities_%_(Net),Equity_Region_Greater_Europe_%_(Net),Equity_Region_Greater_Asia_%_(Net),Sharpe_Ratio_5_Yr_(Mo-End)_USD,Sharpe_Ratio_10_Yr_(Mo-End)_USD,NAV_(Mo-End)_USD,CSCA,Available,CSC
    ACISX,AB Corporate Income,-0.33,-2.86,-0.27,2.17,3.03,3.71,0,5.25,,,,,-0.28,99.08,1.03,79,0.41,,5.92,"62,081,590.00",,Medium Moderate,US Fund Intermediate-Term Bond,,BBgBarc US Credit TR USD,Fixed Income,No,No,-10.75,0.56,135.27,142.46,FSUSA07I1K,3.54,28.97,10.79,2.33,10.52,-2.32,8.78,-0.81,5.75,6.34,1.29,4.53,1.71,1.87,129.91,166.45,,14.52,12/11/2006,-13.79,"5,702,655.10",47.22,55,59.17,"87,891,308.00",,78.08,81.71,84.63,51.58,,2.72,4.09,6.23,0,0,89.27,3.94,6.79,,,,,,,,,,No,Below Average,47.16,,,72.37,7.14,10.16,1.13,5.19,44.86,47.84,0.57,0,0,0.41,,,,,,,,,,,,,-1.4,,,,,,BBgBarc US Credit TR USD,BBgBarc US Agg Bond TR USD,,0.16,0.64,0.54,0.37,1.02,1.22,1.34,1.37,492,BBB,0,0,0,3.94,0.24,1.37,89.9,0,0,1.14,-1.82,0,0,0,0.27,0.14,Income,,,,,,,,,,,,,,0.64,0.8,10.81,1,2,1
    ABIMX,AB Impact Municipal Income,1.8,-0.24,,,,,0,,55,,,,,,,,,,0.75,,,,US Fund High Yield Muni,,,Tax Preferred,No,No,,,,,FS0000DBB7,,,,,,,,,,,,,,,,,,1.8,9/12/2017,-1.24,"26,755,779.21",,,,"48,778,109.00",,,,,,,,,,0,0,91.17,8.83,0,,,,,,,,,,Yes,,,,,91.17,,,,,,,,,,,,,,,,,,,,,,,30.57,,95,,,,N/A,BBgBarc Municipal 10 Yr 8-12 TR USD,,,,,,,,,,58,,0,0,0,8.83,0,0,0,0,0,0,0,0.54,0,0,0,0,Municipal Bond - National,,,,,,,,,,,,,,,,9.9,99,1,1
    MISHX,AB Municipal Income,2.03,0.02,4.17,5.35,4.86,4.5,0,,,,,,1.46,96.05,1.05,23,1.03,,5.94,"1,410,570,844.00",,Medium Extensive,US Fund High Yield Muni,,BBgBarc Municipal 20 Yr 17-22 TR USD,Tax Preferred,No,No,,0.68,158.75,162.14,FSUSA0AVCH,,,,14.48,15.1,-8.22,18.16,5.82,1.81,9.57,1.13,,1.5,2.84,119.92,,,6.61,9/1/2010,-12.17,"488,911,433.11",80.56,75,,"2,827,036,567.00",,94.11,94.92,90.72,,,3.42,5.99,,0,0,98.78,1.22,0,,,,,,,,,,No,,,,,98.47,7.49,8.27,9.27,14.63,39.91,18.39,5.87,2.77,0.31,8.85,,,,,,,,,,,,,9.73,,,,,,BBgBarc Municipal TR USD,BBgBarc Municipal 10 Yr 8-12 TR USD,,3.08,1.81,0.44,,1.3,1.33,1.61,,697,BBB,0,0,0,1.22,0,0,0.08,0,0,0,0,0.34,0,0,0,0,Municipal Bond - National,,,,,,,,,,,,,,0.75,,11.47,1,2,1
    CSHTX,AB Taxable Multi-Sector Income,0.61,0.24,0.79,1.26,1.2,0.79,0,,,,,,0.51,84.84,0.73,85,0.7,,7.75,"174,698,195.00",,Medium Limited,US Fund Multisector Bond,,Morningstar US Shrt Core Bd TR USD,Fixed Income,No,No,,-0.36,14.39,33.05,FSUSA0AXAE,,,,5.15,-1.68,0.17,0.94,0.78,2.01,1.75,1.9,,2.14,2.17,13.76,,,2.95,9/15/2010,-5.76,"3,045,770.35",41.67,43.33,,"136,623,372.00",,59.49,68.51,64.4,,,0.7,0.89,,0,0,98.93,-1.19,2.25,,,,,,,,,,No,,,,,89.12,1.9,1.89,22.79,11.28,38.75,26.31,0,0,0,0.87,,,,,,,,,,,,,19.57,,,,,,BBgBarc US Agg ex Government,BBgBarc US Universal TR USD,BBgBarc US Agg ex Gov and ex MBS,-0.21,0.39,0.36,,0.23,0.25,0.26,,292,A,1.41,17.67,0,-1.19,4.08,0,61.23,0,0,12.36,0,0,0.7,0,0,1.49,Multisector Bond,,,,,,,,,,,,,,0.85,,9.72,1,2,1
    BRASX,BlackRock Allocation Target Shrs Ser Svc,0.57,0.12,1.02,1.92,1.9,0.89,0,3.36,6,12,74,91,1.16,58.23,0.69,263,1.31,2,7.5,,,,US Fund Corporate Bond,13,Morningstar US Shrt Core Bd TR USD,Fixed Income,No,No,2.56,-0.03,7.78,43.46,FSUSA08KUZ,5.58,9.23,4.71,2.96,5.58,1.53,1.86,1.15,3.08,2.48,1.95,2.91,2.25,2.23,4.61,-3.7,,3.49,9/30/2004,-0.91,"13,361,987.90",58.33,53.33,53.33,"174,698,616.00",3,42.71,45.01,49.26,22.29,,0.8,1.01,1.4,0,0,123.29,-23.3,0.02,,,,,,,,,,No,,47.15,,,108.19,,,,,,,,,,,,,,,,,,,,,,,9.89,,7,92,,,ICE BofAML 1-3Y US Trsy TR USD,BBgBarc US Corp Bond TR USD,,0.02,1.05,1.07,2.3,0.22,0.23,0.26,0.2,375,,7.42,27.67,0,-25.66,11.22,0,77.38,0,0,0,0.54,0,1.43,0,0,0,Multisector Bond,,,,,,,,,,,,,,1.43,2.1,9.39,99,1,1
    SMARX,Brandes Separately Managed Acct Rsrv Tr,0.64,-0.13,1.19,3.43,3.95,3.57,0,5.9,4,9,14,16,0.54,66.59,0.52,39.74,0.77,4,9.64,"167,423,406.00",,Low Limited,US Fund Corporate Bond,41,ICE BofAML US High Yield TR USD,Fixed Income,No,No,-30.43,0.79,62.77,117.38,FSUSA06UFM,0.54,42.59,18.92,4.74,14.87,4.57,5.58,-3.69,12.19,4.74,1.53,8.57,2.95,2.51,72.84,139.05,,20.91,10/3/2005,-26.98,"3,777,628.38",52.78,51.67,60.83,"177,831,972.00",19,62.65,35.41,46.82,11.61,,1.39,3.35,9.06,0.04,0,99.48,0.48,0,,,,,,,,,,No,Low,42.34,0.04,0,91.33,4.38,7.66,32.2,1.9,16.3,18.7,13.5,10.6,6.8,0,0,0.04,0,0,0,0,0,0,0,0,0,0,47.47,0,8,19,,,BBgBarc US Agg Bond TR USD,BBgBarc US Corp Bond TR USD,BBgBarc US Interm Credit TR USD,0.62,2.18,2.23,2.64,0.47,0.77,0.81,0.94,45,BB,2.48,4.22,0,0.48,0,0,68.96,0,0,23.83,0,0,0,0,0,0,Growth and Income,0,0,0.04,0,0,0,0,0,0,0,0,0,0,1.05,0.64,8.7,99,1,1
    Last edited by HalPlz; Jun 13th, 2018 at 08:03 PM.

  2. #2
    Super Moderator vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,375
    Thanks
    3
    Thanked 47 Times in 47 Posts
    I've been working on something just like this for the last couple of days on a personal project, so you're in luck.

    First of all, your CREATE TABLE statement below is missing quite a few columns. Did you mean to just show the first few of them? It would help if you showed the complete CREATE TABLE statement so I could attempt to reproduce your problem on my own server.

    Secondly, I assume you're using "CSV using LOAD DATA" to load this csv into your mySQL database table?

    Do you have "Skip this number of queries (for SQL) or lines (for other formats), starting from the first one:" set to zero? When I opened your csv file in Excel, I noticed that the first 2 lines are empty and the next line contains column titles, so "Skip this number of queries (for SQL) or lines (for other formats), starting from the first one:" should be set to 3.

    Is "Replace table data with file" checked? If so, do you have "Columns separated with:" set as a comma? The default is semi-colon. Make sure you change that.

    Also, make sure you have the same number of columns in your csv file as you have in your CREATE TABLE statement, and make sure both the csv file and the table are in the same order, because that's the way they will be loaded into your database.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    SNAP to it!

  3. Users who have thanked vinyl-junkie for this post:

    HalPlz (Jun 14th, 2018)

  4. #3
    Master Coder sunfighter's Avatar
    Join Date
    Jan 2011
    Location
    Washington
    Posts
    7,613
    Thanks
    34
    Thanked 1,029 Times in 1,026 Posts
    I'm gonna take it that the Create Table is cut off and you have many more row titles.
    Next in the second line of csv and every line there after you have quote marks that span a number of commas IE; "62,081,590.00". The double quote must be removed the same goes for parentheses in the title, first csv line.
    I did that and then counted the commas. 165 for the column names and 171 for line two. Compare line 3 you get 165 and 169 and two sets of the quotes, not four.

    You gotta get your data to match the columns and the csv lines have to be in the same format not 171 and 169. And get rid of those double quotes.
    Last edited by sunfighter; Jun 14th, 2018 at 01:10 AM.
    Evolution - The non-random survival of random variants.
    Physics is actually atoms trying to understand themselves.

  5. Users who have thanked sunfighter for this post:

    HalPlz (Jun 14th, 2018)

  6. #4
    New Coder
    Join Date
    Jun 2016
    Posts
    44
    Thanks
    16
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by sunfighter View Post
    I'm gonna take it that the Create Table is cut off and you have many more row titles.
    Next in the second line of csv and every line there after you have quote marks that span a number of commas IE; "62,081,590.00". The double quote must be removed the same goes for parentheses in the title, first csv line.
    I did that and then counted the commas. 165 for the column names and 171 for line two. Compare line 3 you get 165 and 169 and two sets of the quotes, not four.

    You gotta get your data to match the columns and the csv lines have to be in the same format not 171 and 169. And get rid of those double quotes.
    I removed all parentheses, apostrophes, quote marks, and commas. It looks like the double quotes you're pointing out were around large values that contained commas. I formatted those columns into numbers and removed all commas. I'm not sure about how what you mean by "get your data to match the columns and the csv lines have to be in the same format", do you mean like text, number, or general? or just lined up commas?


    Here is a DL link to my actual data (33mb)
    https://drive.google.com/open?id=1YB...QMC4kXem8eikkY


    Quote Originally Posted by vinyl-junkie View Post
    I've been working on something just like this for the last couple of days on a personal project, so you're in luck.

    First of all, your CREATE TABLE statement below is missing quite a few columns. Did you mean to just show the first few of them? It would help if you showed the complete CREATE TABLE statement so I could attempt to reproduce your problem on my own server.

    Secondly, I assume you're using "CSV using LOAD DATA" to load this csv into your mySQL database table?

    Do you have "Skip this number of queries (for SQL) or lines (for other formats), starting from the first one:" set to zero? When I opened your csv file in Excel, I noticed that the first 2 lines are empty and the next line contains column titles, so "Skip this number of queries (for SQL) or lines (for other formats), starting from the first one:" should be set to 3.

    Is "Replace table data with file" checked? If so, do you have "Columns separated with:" set as a comma? The default is semi-colon. Make sure you change that.

    Also, make sure you have the same number of columns in your csv file as you have in your CREATE TABLE statement, and make sure both the csv file and the table are in the same order, because that's the way they will be loaded into your database.
    yes @ trying to upload using the "load CSV" option. I've also tried all of the other formats.

    I had the skipping lines/queries set to 0. I will try it set to 3, although when I open my CSV I don't see blank lines at the top or blank columns on the left.

    I have it set to Comma, which is the default for me, but I don't see anything about replacing the table with data file.

    Thank you both!
    Last edited by HalPlz; Jun 14th, 2018 at 06:08 AM.

  7. #5
    New Coder
    Join Date
    Jun 2016
    Posts
    44
    Thanks
    16
    Thanked 0 Times in 0 Posts
    Here is a bigger chunk of the SQL file:
    Code:
    /* CREATE TABLE */
    CREATE TABLE MorningstarData630(
    Ticker VARCHAR(100),
    Name VARCHAR(100),
    Total_Ret_3_Mo_MoEnd_USD DOUBLE,
    Total_Ret_YTD_MoEnd_USD DOUBLE,
    Total_Ret_1_Yr_MoEnd_USD DOUBLE,
    Total_Ret_Annlzd_3_Yr_MoEnd_USD DOUBLE,
    Total_Ret_Annlzd_5_Yr_MoEnd_USD DOUBLE,
    Std_Dev_3_Yr_MoEnd_USD DOUBLE,
    Prospectus_Net_Expense_Ratio DOUBLE,
    Total_Ret_Annlzd_10_Yr_MoEnd_USD DOUBLE,
    Total_Ret__Rank_Cat_3_Mo_MoEnd VARCHAR(100),
    Total_Ret__Rank_Cat_1_Yr_MoEnd VARCHAR(100),
    Total_Ret__Rank_Cat_3_Yr_MoEnd VARCHAR(100),
    Total_Ret__Rank_Cat_5_Yr_MoEnd VARCHAR(100),
    Best_Fit_Alpha_3_Yr_MoEnd DOUBLE,
    Best_Fit_RSquared_3_Yr_MoEnd DOUBLE,
    Best_Fit_Beta_3_Yr_MoEnd DOUBLE,
    Turnover_Ratio_ DOUBLE,
    Sharpe_Ratio_3_Yr_MoEnd_USD DOUBLE,
    Morningstar_Rating_Overall VARCHAR(100),
    Manager_Tenure_Average DOUBLE,
    Net_Assets__Average DOUBLE,
    Equity_Style_Box_Long VARCHAR(100),
    Fixed_Inc_Style_Box_Long VARCHAR(100),
    Morningstar_Category VARCHAR(100),
    Bear_Market_Rank__MoEnd VARCHAR(100),
    Best_Fit_Index_3_Yr_MoEnd VARCHAR(100),
    Global_Broad_Category_Group VARCHAR(100),
    Index_Fund VARCHAR(100),
    Enhanced_Index VARCHAR(100),
    Annual_Ret_2008_USD DOUBLE,
    Information_Ratio_5_Yr_MoEnd_USD DOUBLE,
    Downside_Capture_Ratio_5_Yr_MoEnd_USD DOUBLE,
    Upside_Capture_Ratio_5_Yr_MoEnd_USD DOUBLE,
    FundId VARCHAR(100),
    Annual_Ret_2007_USD DOUBLE,
    Annual_Ret_2009_USD DOUBLE,
    Annual_Ret_2010_USD DOUBLE,
    Annual_Ret_2011_USD DOUBLE,
    Annual_Ret_2012_USD DOUBLE,
    Annual_Ret_2013_USD DOUBLE,
    Annual_Ret_2014_USD DOUBLE,
    Annual_Ret_2015_USD DOUBLE,
    Annual_Ret_2016_USD DOUBLE,
    Annual_Ret_2017_USD DOUBLE,
    Tracking_Error_1_Yr_MoEnd_USD DOUBLE,
    Tracking_Error_10_Yr_MoEnd_USD DOUBLE,
    Tracking_Error_3_Yr_MoEnd_USD DOUBLE,
    Tracking_Error_5_Yr_MoEnd_USD DOUBLE,
    Downside_Capture_Ratio_3_Yr_MoEnd_USD DOUBLE,
    Downside_Capture_Ratio_10_Yr_MoEnd_USD DOUBLE,
    Downside_Capture_Ratio_15_Yr_MoEnd_USD VARCHAR(100),
    Best_3_Mo_Ret_Inception_MoEnd_USD DOUBLE,
    Inception_Date VARCHAR(100),
    Worst_3_Mo_Ret_Inception_MoEnd_USD DOUBLE,
    Est_FundLevel_Net_Flow_YTD_MoEnd_USD DOUBLE,
    Batting_Average_3_Yr_MoEnd_USD DOUBLE,
    Batting_Average_5_Yr_MoEnd_USD DOUBLE,
    Batting_Average_10_Yr_MoEnd_USD DOUBLE,
    Fund_Size_USD DOUBLE,
    Volatility_Rank__MoEnd VARCHAR(100),
    RSquared_1_Yr_MoEnd_USD DOUBLE,
    RSquared_3_Yr_MoEnd_USD DOUBLE,
    RSquared_5_Yr_MoEnd_USD DOUBLE,
    RSquared_10_Yr_MoEnd_USD DOUBLE,
    Total_Ret_Annlzd_15_Yr_MoEnd_USD VARCHAR(100),
    Std_Dev_1_Yr_MoEnd_USD DOUBLE,
    Std_Dev_5_Yr_MoEnd_USD DOUBLE,
    Std_Dev_10_Yr_MoEnd_USD DOUBLE,
    Asset_Alloc_NonUS_Equity__Net DOUBLE,
    Asset_Alloc_US_Equity__Net DOUBLE,
    Asset_Alloc_Bond__Net DOUBLE,
    Asset_Alloc_Cash__Net DOUBLE,
    Asset_Alloc_Other__Net DOUBLE,
    Equity_Style_Large_Core__Net VARCHAR(100),
    Equity_Style_Large_Growth__Net VARCHAR(100),
    Equity_Style_Large_Value__Net VARCHAR(100),
    Equity_Style_Mid_Core__Net VARCHAR(100),
    Equity_Style_Mid_Growth__Net VARCHAR(100),
    Equity_Style_Mid_Value__Net VARCHAR(100),
    Equity_Style_Small_Core__Net VARCHAR(100),
    Equity_Style_Small_Growth__Net VARCHAR(100),
    Equity_Style_Small_Value__Net VARCHAR(100),
    Socially_Conscious VARCHAR(100),
    Morningstar_Sustainability_Rating VARCHAR(100),
    Portfolio_Sustainability_Score DOUBLE,
    Equity_Region_Emerging__Net VARCHAR(100),
    Equity_Region_Developed__Net VARCHAR(100),
    Asset_Alloc_US_Bond__Net DOUBLE,
    Average_Eff_Duration DOUBLE,
    Average_Eff_Maturity DOUBLE,
    Credit_Qual_AAA_ DOUBLE,
    Credit_Qual_AA_ DOUBLE,
    Credit_Qual_A_ DOUBLE,
    Credit_Qual_BBB_ DOUBLE,
    Credit_Qual_BB_ DOUBLE,
    Credit_Qual_B_ DOUBLE,
    Credit_Qual_Below_B_ DOUBLE,
    Credit_Qual_Not_Rated_ DOUBLE,
    Equity_Region_North_America__Net VARCHAR(100),
    Equity_Region_Latin_America__Net VARCHAR(100),
    Equity_Region_Japan__Net VARCHAR(100),
    Equity_Region_Australasia__Net VARCHAR(100),
    Equity_Region_Asia_dev__Net VARCHAR(100),
    Equity_Region_Asia_emrg__Net VARCHAR(100),
    Equity_Region_United_Kingdom__Net VARCHAR(100),
    Equity_Region_Europe_dev__Net VARCHAR(100),
    Equity_Region_Europe_emrg__Net VARCHAR(100),
    Equity_Region_AfricaMiddle_East__Net VARCHAR(100),
    Equity_Country_Canada__Net VARCHAR(100),
    Equity_Country_United_States__Net VARCHAR(100),
    _Asset_in_Top_10_Holdings DOUBLE,
    Equity_Region_Not_Classified__Net VARCHAR(100),
    Total_Ret__Rank_Cat_YTD_MoEnd VARCHAR(100),
    Total_Ret__Rank_Cat_10_Yr_MoEnd VARCHAR(100),
    Morningstar_Analyst_Rating VARCHAR(100),
    Style_Consistency_Long VARCHAR(100),
    Primary_Prospectus_Benchmark VARCHAR(100),
    Analyst_Assigned_Benchmark VARCHAR(100),
    Secondary_Prospectus_Benchmark VARCHAR(100),
    Alpha_1_Yr_MoEnd_USD DOUBLE,
    Alpha_3_Yr_MoEnd_USD DOUBLE,
    Alpha_5_Yr_MoEnd_USD DOUBLE,
    Alpha_10_Yr_MoEnd_USD DOUBLE,
    Beta_1_Yr_MoEnd_USD DOUBLE,
    Beta_3_Yr_MoEnd_USD DOUBLE,
    Beta_5_Yr_MoEnd_USD DOUBLE,
    Beta_10_Yr_MoEnd_USD DOUBLE,
    _of_Bond_Holdings_Long DOUBLE,
    Average_Credit_Quality VARCHAR(100),
    FixedInc_Agency_MortgageBacked__Net DOUBLE,
    FixedInc_AssetBacked__Net DOUBLE,
    FixedInc_Bank_Loan__Net DOUBLE,
    FixedInc_Cash__Equivalents__Net DOUBLE,
    FixedInc_Commercial_MortgageBacked__Net DOUBLE,
    FixedInc_Convertible__Net DOUBLE,
    FixedInc_Corporate_Bond__Net DOUBLE,
    FixedInc_Covered_Bond__Net DOUBLE,
    FixedInc_ForwardFuture__Net DOUBLE,
    FixedInc_Government__Net DOUBLE,
    FixedInc_Government_Related__Net DOUBLE,
    FixedInc_Municipal_Taxable__Net DOUBLE,
    FixedIncential_MortgageBacked__Net DOUBLE,
    FixedInc_OptionWarrant__Net DOUBLE,
    FixedInc_Preferred_Stock__Net DOUBLE,
    FixedInc_Swap__Net DOUBLE,
    Prospectus_Objective VARCHAR(100),
    Equity_Sector_Basic_Materials__Net VARCHAR(100),
    Equity_Sector_Communication_Services__Net VARCHAR(100),
    Equity_Sector_Consumer_Cyclical__Net VARCHAR(100),
    Equity_Sector_Consumer_Defensive__Net VARCHAR(100),
    Equity_Sector_Energy__Net VARCHAR(100),
    Equity_Sector_Financial_Services__Net VARCHAR(100),
    Equity_Sector_Healthcare__Net VARCHAR(100),
    Equity_Sector_Industrials__Net VARCHAR(100),
    Equity_Sector_Real_Estate__Net VARCHAR(100),
    Equity_Sector_Technology__Net VARCHAR(100),
    Equity_Sector_Utilities__Net VARCHAR(100),
    Equity_Region_Greater_Europe__Net VARCHAR(100),
    Equity_Region_Greater_Asia__Net VARCHAR(100),
    Sharpe_Ratio_5_Yr_MoEnd_USD DOUBLE,
    Sharpe_Ratio_10_Yr_MoEnd_USD DOUBLE,
    NAV_MoEnd_USD DOUBLE,
    CSCA DOUBLE,
    Available DOUBLE,
    CSC DOUBLE,
    Total_Ret_3_Mo_MoEnd_USD_Z DOUBLE,
    Total_Ret_YTD_MoEnd_USD_Z DOUBLE,
    Total_Ret_1_Yr_MoEnd_USD_Z DOUBLE,
    Total_Ret_Annlzd_3_Yr_MoEnd_USD_Z DOUBLE,
    Total_Ret_Annlzd_5_Yr_MoEnd_USD_Z DOUBLE,
    Std_Dev_3_Yr_MoEnd_USD_Z DOUBLE,
    Prospectus_Net_Expense_Ratio_Z DOUBLE,
    Total_Ret_Annlzd_10_Yr_MoEnd_USD_Z DOUBLE,
    Total_Ret__Rank_Cat_3_Mo_MoEnd_Z DOUBLE,
    Total_Ret__Rank_Cat_1_Yr_MoEnd_Z DOUBLE,
    Total_Ret__Rank_Cat_3_Yr_MoEnd_Z DOUBLE,
    Total_Ret__Rank_Cat_5_Yr_MoEnd_Z DOUBLE,
    Best_Fit_Alpha_3_Yr_MoEnd_Z DOUBLE,
    Best_Fit_RSquared_3_Yr_MoEnd_Z DOUBLE,
    Best_Fit_Beta_3_Yr_MoEnd_Z DOUBLE,
    Turnover_Ratio__Z DOUBLE,
    Sharpe_Ratio_3_Yr_MoEnd_USD_Z DOUBLE,
    Morningstar_Rating_Overall_Z DOUBLE,
    Manager_Tenure_Average_Z DOUBLE,
    Net_Assets__Average_Z DOUBLE,
    Equity_Style_Box_Long_Z VARCHAR(100),
    Fixed_Inc_Style_Box_Long_Z VARCHAR(100),
    Morningstar_Category_Z VARCHAR(100),
    Bear_Market_Rank__MoEnd_Z DOUBLE,
    Best_Fit_Index_3_Yr_MoEnd_Z VARCHAR(100),
    Global_Broad_Category_Group_Z VARCHAR(100),
    Index_Fund_Z VARCHAR(100),
    Enhanced_Index_Z VARCHAR(100),
    Annual_Ret_2008_USD_Z DOUBLE,
    Information_Ratio_5_Yr_MoEnd_USD_Z DOUBLE,
    Downside_Capture_Ratio_5_Yr_MoEnd_USD_Z DOUBLE,
    Upside_Capture_Ratio_5_Yr_MoEnd_USD_Z DOUBLE,
    FundId_Z VARCHAR(100),
    Annual_Ret_2007_USD_Z DOUBLE,
    Annual_Ret_2009_USD_Z DOUBLE,
    Annual_Ret_2010_USD_Z DOUBLE,
    Annual_Ret_2011_USD_Z DOUBLE,
    Annual_Ret_2012_USD_Z DOUBLE,
    Annual_Ret_2013_USD_Z DOUBLE,
    Annual_Ret_2014_USD_Z DOUBLE,
    Annual_Ret_2015_USD_Z DOUBLE,
    Annual_Ret_2016_USD_Z DOUBLE,
    Annual_Ret_2017_USD_Z DOUBLE,
    Tracking_Error_1_Yr_MoEnd_USD_Z DOUBLE,
    Tracking_Error_10_Yr_MoEnd_USD_Z DOUBLE,
    Tracking_Error_3_Yr_MoEnd_USD_Z DOUBLE,
    Tracking_Error_5_Yr_MoEnd_USD_Z DOUBLE,
    Downside_Capture_Ratio_3_Yr_MoEnd_USD_Z DOUBLE,
    Downside_Capture_Ratio_10_Yr_MoEnd_USD_Z DOUBLE,
    Downside_Capture_Ratio_15_Yr_MoEnd_USD_Z DOUBLE,
    Best_3_Mo_Ret_Inception_MoEnd_USD_Z DOUBLE,
    Inception_Date_Z DOUBLE,
    Worst_3_Mo_Ret_Inception_MoEnd_USD_Z DOUBLE,
    Est_FundLevel_Net_Flow_YTD_MoEnd_USD_Z DOUBLE,
    Batting_Average_3_Yr_MoEnd_USD_Z DOUBLE,
    Batting_Average_5_Yr_MoEnd_USD_Z DOUBLE,
    Batting_Average_10_Yr_MoEnd_USD_Z DOUBLE,
    Fund_Size_USD_Z DOUBLE,
    Volatility_Rank__MoEnd_Z DOUBLE,
    RSquared_1_Yr_MoEnd_USD_Z DOUBLE,
    RSquared_3_Yr_MoEnd_USD_Z DOUBLE,
    RSquared_5_Yr_MoEnd_USD_Z DOUBLE,
    RSquared_10_Yr_MoEnd_USD_Z DOUBLE,
    Total_Ret_Annlzd_15_Yr_MoEnd_USD_Z DOUBLE,
    Std_Dev_1_Yr_MoEnd_USD_Z DOUBLE,
    Std_Dev_5_Yr_MoEnd_USD_Z DOUBLE,
    Std_Dev_10_Yr_MoEnd_USD_Z DOUBLE,
    Asset_Alloc_NonUS_Equity__Net_Z DOUBLE,
    Asset_Alloc_US_Equity__Net_Z DOUBLE,
    Asset_Alloc_Bond__Net_Z DOUBLE,
    Asset_Alloc_Cash__Net_Z DOUBLE,
    Asset_Alloc_Other__Net_Z DOUBLE,
    Equity_Style_Large_Core__Net_Z DOUBLE,
    Equity_Style_Large_Growth__Net_Z DOUBLE,
    Equity_Style_Large_Value__Net_Z DOUBLE,
    Equity_Style_Mid_Core__Net_Z DOUBLE,
    Equity_Style_Mid_Growth__Net_Z DOUBLE,
    Equity_Style_Mid_Value__Net_Z DOUBLE,
    Equity_Style_Small_Core__Net_Z DOUBLE,
    Equity_Style_Small_Growth__Net_Z DOUBLE,
    Equity_Style_Small_Value__Net_Z DOUBLE,
    Socially_Conscious_Z VARCHAR(100),
    Morningstar_Sustainability_Rating_Z VARCHAR(100),
    Portfolio_Sustainability_Score_Z DOUBLE,
    Equity_Region_Emerging__Net_Z DOUBLE,
    Equity_Region_Developed__Net_Z DOUBLE,
    Asset_Alloc_US_Bond__Net_Z DOUBLE,
    Average_Eff_Duration_Z DOUBLE,
    Average_Eff_Maturity_Z DOUBLE,
    Credit_Qual_AAA__Z DOUBLE,
    Credit_Qual_AA__Z DOUBLE,
    Credit_Qual_A__Z DOUBLE,
    Credit_Qual_BBB__Z DOUBLE,
    Credit_Qual_BB__Z DOUBLE,
    Credit_Qual_B__Z DOUBLE,
    Credit_Qual_Below_B__Z DOUBLE,
    Credit_Qual_Not_Rated__Z DOUBLE,
    Equity_Region_North_America__Net_Z DOUBLE,
    Equity_Region_Latin_America__Net_Z DOUBLE,
    Equity_Region_Japan__Net_Z DOUBLE,
    Equity_Region_Australasia__Net_Z DOUBLE,
    Equity_Region_Asia_dev__Net_Z DOUBLE,
    Equity_Region_Asia_emrg__Net_Z DOUBLE,
    Equity_Region_United_Kingdom__Net_Z DOUBLE,
    Equity_Region_Europe_dev__Net_Z DOUBLE,
    Equity_Region_Europe_emrg__Net_Z DOUBLE,
    Equity_Region_AfricaMiddle_East__Net_Z DOUBLE,
    Equity_Country_Canada__Net_Z DOUBLE,
    Equity_Country_United_States__Net_Z DOUBLE,
    _Asset_in_Top_10_Holdings_Z DOUBLE,
    Equity_Region_Not_Classified__Net_Z VARCHAR(100),
    Total_Ret__Rank_Cat_YTD_MoEnd_Z DOUBLE,
    Total_Ret__Rank_Cat_10_Yr_MoEnd_Z DOUBLE,
    Morningstar_Analyst_Rating_Z VARCHAR(100),
    Style_Consistency_Long_Z VARCHAR(100),
    Primary_Prospectus_Benchmark_Z VARCHAR(100),
    Analyst_Assigned_Benchmark_Z VARCHAR(100),
    Secondary_Prospectus_Benchmark_Z VARCHAR(100),
    Alpha_1_Yr_MoEnd_USD_Z DOUBLE,
    Alpha_3_Yr_MoEnd_USD_Z DOUBLE,
    Alpha_5_Yr_MoEnd_USD_Z DOUBLE,
    Alpha_10_Yr_MoEnd_USD_Z DOUBLE,
    Beta_1_Yr_MoEnd_USD_Z DOUBLE,
    Beta_3_Yr_MoEnd_USD_Z DOUBLE,
    Beta_5_Yr_MoEnd_USD_Z DOUBLE,
    Beta_10_Yr_MoEnd_USD_Z DOUBLE,
    _of_Bond_Holdings_Long_Z DOUBLE,
    Average_Credit_Quality_Z VARCHAR(100),
    FixedIncAgency_MortgageBacked__Net_Z DOUBLE,
    FixedIncAssetBacked__Net_Z DOUBLE,
    Fixed_Bank_Loan__Net_Z DOUBLE,
    FixedInc_ash__Equivalents__Net_Z DOUBLE,
    FixedIncComme_MortgageBacked__Net_Z DOUBLE,
    FixedIncConvertible__Net_Z DOUBLE,
    FixedInc_Corporate_Bond__Net_Z DOUBLE,
    FixedIncCovered_Bond__Net_Z DOUBLE,
    FixedInc_ForwardFuture__Net_Z DOUBLE,
    FixedIncGovernment__Net_Z DOUBLE,
    FixedIncGovernment_Related__Net_Z DOUBLE,
    FixedIncMunicipal_Taxable__Net_Z DOUBLE,
    FixedIncMortgageBacked__Net_Z DOUBLE,
    FixedIncSector_OptionWarrant__Net_Z DOUBLE,
    FixedIncSector_Preferred_Stock__Net_Z DOUBLE,
    FixedInc_Swap__Net_Z DOUBLE,
    Prospectus_Objective_Z VARCHAR(100),
    EquityBasic_Materials__Net_Z DOUBLE,
    EqCommunication_Services__Net_Z DOUBLE,
    EqConsumer_Cyclical__Net_Z DOUBLE,
    EquityConsumer_Defensive__Net_Z DOUBLE,
    Equity_Sector_Energy__Net_Z DOUBLE,
    EquityFinancial_Services__Net_Z DOUBLE,
    Equity_Sector_Healthcare__Net_Z DOUBLE,
    Equity_Sector_Industrials__Net_Z DOUBLE,
    Equity_Sector_Real_Estate__Net_Z DOUBLE,
    Equity_Sector_Technology__Net_Z DOUBLE,
    Equity_Sector_Utilities__Net_Z DOUBLE,
    Equity_Region_Greater_Europe__Net_Z DOUBLE,
    Equity_Region_Greater_Asia__Net_Z DOUBLE,
    Sharpe_Ratio_5_Yr_MoEnd_USD_Z DOUBLE,
    Sharpe_Ratio_10_Yr_MoEnd_USD_Z DOUBLE,
    NAV_MoEnd_USD_Z DOUBLE
    );

  8. #6
    New Coder
    Join Date
    Jun 2016
    Posts
    44
    Thanks
    16
    Thanked 0 Times in 0 Posts
    and the insert statement:

    Code:
    /* INSERT QUERY NO: 1 */
    INSERT INTO MorningstarData630(Ticker, Name, Total_Ret_3_Mo_MoEnd_USD, Total_Ret_YTD_MoEnd_USD, Total_Ret_1_Yr_MoEnd_USD, Total_Ret_Annlzd_3_Yr_MoEnd_USD, Total_Ret_Annlzd_5_Yr_MoEnd_USD, Std_Dev_3_Yr_MoEnd_USD, Prospectus_Net_Expense_Ratio, Total_Ret_Annlzd_10_Yr_MoEnd_USD, Total_Ret__Rank_Cat_3_Mo_MoEnd, Total_Ret__Rank_Cat_1_Yr_MoEnd, Total_Ret__Rank_Cat_3_Yr_MoEnd, Total_Ret__Rank_Cat_5_Yr_MoEnd, Best_Fit_Alpha_3_Yr_MoEnd, Best_Fit_RSquared_3_Yr_MoEnd, Best_Fit_Beta_3_Yr_MoEnd, Turnover_Ratio_, Sharpe_Ratio_3_Yr_MoEnd_USD, Morningstar_Rating_Overall, Manager_Tenure_Average, Net_Assets__Average, Equity_Style_Box_Long, Fixed_Inc_Style_Box_Long, Morningstar_Category, Bear_Market_Rank__MoEnd, Best_Fit_Index_3_Yr_MoEnd, Global_Broad_Category_Group, Index_Fund, Enhanced_Index, Annual_Ret_2008_USD, Information_Ratio_5_Yr_MoEnd_USD, Downside_Capture_Ratio_5_Yr_MoEnd_USD, Upside_Capture_Ratio_5_Yr_MoEnd_USD, FundId, Annual_Ret_2007_USD, Annual_Ret_2009_USD, Annual_Ret_2010_USD, Annual_Ret_2011_USD, Annual_Ret_2012_USD, Annual_Ret_2013_USD, Annual_Ret_2014_USD, Annual_Ret_2015_USD, Annual_Ret_2016_USD, Annual_Ret_2017_USD, Tracking_Error_1_Yr_MoEnd_USD, Tracking_Error_10_Yr_MoEnd_USD, Tracking_Error_3_Yr_MoEnd_USD, Tracking_Error_5_Yr_MoEnd_USD, Downside_Capture_Ratio_3_Yr_MoEnd_USD, Downside_Capture_Ratio_10_Yr_MoEnd_USD, Downside_Capture_Ratio_15_Yr_MoEnd_USD, Best_3_Mo_Ret_Inception_MoEnd_USD, Inception_Date, Worst_3_Mo_Ret_Inception_MoEnd_USD, Est_FundLevel_Net_Flow_YTD_MoEnd_USD, Batting_Average_3_Yr_MoEnd_USD, Batting_Average_5_Yr_MoEnd_USD, Batting_Average_10_Yr_MoEnd_USD, Fund_Size_USD, Volatility_Rank__MoEnd, RSquared_1_Yr_MoEnd_USD, RSquared_3_Yr_MoEnd_USD, RSquared_5_Yr_MoEnd_USD, RSquared_10_Yr_MoEnd_USD, Total_Ret_Annlzd_15_Yr_MoEnd_USD, Std_Dev_1_Yr_MoEnd_USD, Std_Dev_5_Yr_MoEnd_USD, Std_Dev_10_Yr_MoEnd_USD, Asset_Alloc_NonUS_Equity__Net, Asset_Alloc_US_Equity__Net, Asset_Alloc_Bond__Net, Asset_Alloc_Cash__Net, Asset_Alloc_Other__Net, Equity_Style_Large_Core__Net, Equity_Style_Large_Growth__Net, Equity_Style_Large_Value__Net, Equity_Style_Mid_Core__Net, Equity_Style_Mid_Growth__Net, Equity_Style_Mid_Value__Net, Equity_Style_Small_Core__Net, Equity_Style_Small_Growth__Net, Equity_Style_Small_Value__Net, Socially_Conscious, Morningstar_Sustainability_Rating, Portfolio_Sustainability_Score, Equity_Region_Emerging__Net, Equity_Region_Developed__Net, Asset_Alloc_US_Bond__Net, Average_Eff_Duration, Average_Eff_Maturity, Credit_Qual_AAA_, Credit_Qual_AA_, Credit_Qual_A_, Credit_Qual_BBB_, Credit_Qual_BB_, Credit_Qual_B_, Credit_Qual_Below_B_, Credit_Qual_Not_Rated_, Equity_Region_North_America__Net, Equity_Region_Latin_America__Net, Equity_Region_Japan__Net, Equity_Region_Australasia__Net, Equity_Region_Asia_dev__Net, Equity_Region_Asia_emrg__Net, Equity_Region_United_Kingdom__Net, Equity_Region_Europe_dev__Net, Equity_Region_Europe_emrg__Net, Equity_Region_AfricaMiddle_East__Net, Equity_Country_Canada__Net, Equity_Country_United_States__Net, _Asset_in_Top_10_Holdings, Equity_Region_Not_Classified__Net, Total_Ret__Rank_Cat_YTD_MoEnd, Total_Ret__Rank_Cat_10_Yr_MoEnd, Morningstar_Analyst_Rating, Style_Consistency_Long, Primary_Prospectus_Benchmark, Analyst_Assigned_Benchmark, Secondary_Prospectus_Benchmark, Alpha_1_Yr_MoEnd_USD, Alpha_3_Yr_MoEnd_USD, Alpha_5_Yr_MoEnd_USD, Alpha_10_Yr_MoEnd_USD, Beta_1_Yr_MoEnd_USD, Beta_3_Yr_MoEnd_USD, Beta_5_Yr_MoEnd_USD, Beta_10_Yr_MoEnd_USD, _of_Bond_Holdings_Long, Average_Credit_Quality, FixedInc_Agency_MortgageBacked__Net, FixedInc_AssetBacked__Net, FixedInc_Bank_Loan__Net, FixedInc_Cash__Equivalents__Net, FixedInc_Commercial_MortgageBacked__Net, FixedInc_Convertible__Net, FixedInc_Corporate_Bond__Net, FixedInc_Covered_Bond__Net, FixedInc_ForwardFuture__Net, FixedInc_Government__Net, FixedInc_Government_Related__Net, FixedInc_Municipal_Taxable__Net, FixedIncential_MortgageBacked__Net, FixedInc_OptionWarrant__Net, FixedInc_Preferred_Stock__Net, FixedInc_Swap__Net, Prospectus_Objective, Equity_Sector_Basic_Materials__Net, Equity_Sector_Communication_Services__Net, Equity_Sector_Consumer_Cyclical__Net, Equity_Sector_Consumer_Defensive__Net, Equity_Sector_Energy__Net, Equity_Sector_Financial_Services__Net, Equity_Sector_Healthcare__Net, Equity_Sector_Industrials__Net, Equity_Sector_Real_Estate__Net, Equity_Sector_Technology__Net, Equity_Sector_Utilities__Net, Equity_Region_Greater_Europe__Net, Equity_Region_Greater_Asia__Net, Sharpe_Ratio_5_Yr_MoEnd_USD, Sharpe_Ratio_10_Yr_MoEnd_USD, NAV_MoEnd_USD, CSCA, Available, CSC, Total_Ret_3_Mo_MoEnd_USD_Z, Total_Ret_YTD_MoEnd_USD_Z, Total_Ret_1_Yr_MoEnd_USD_Z, Total_Ret_Annlzd_3_Yr_MoEnd_USD_Z, Total_Ret_Annlzd_5_Yr_MoEnd_USD_Z, Std_Dev_3_Yr_MoEnd_USD_Z, Prospectus_Net_Expense_Ratio_Z, Total_Ret_Annlzd_10_Yr_MoEnd_USD_Z, Total_Ret__Rank_Cat_3_Mo_MoEnd_Z, Total_Ret__Rank_Cat_1_Yr_MoEnd_Z, Total_Ret__Rank_Cat_3_Yr_MoEnd_Z, Total_Ret__Rank_Cat_5_Yr_MoEnd_Z, Best_Fit_Alpha_3_Yr_MoEnd_Z, Best_Fit_RSquared_3_Yr_MoEnd_Z, Best_Fit_Beta_3_Yr_MoEnd_Z, Turnover_Ratio__Z, Sharpe_Ratio_3_Yr_MoEnd_USD_Z, Morningstar_Rating_Overall_Z, Manager_Tenure_Average_Z, Net_Assets__Average_Z, Equity_Style_Box_Long_Z, Fixed_Inc_Style_Box_Long_Z, Morningstar_Category_Z, Bear_Market_Rank__MoEnd_Z, Best_Fit_Index_3_Yr_MoEnd_Z, Global_Broad_Category_Group_Z, Index_Fund_Z, Enhanced_Index_Z, Annual_Ret_2008_USD_Z, Information_Ratio_5_Yr_MoEnd_USD_Z, Downside_Capture_Ratio_5_Yr_MoEnd_USD_Z, Upside_Capture_Ratio_5_Yr_MoEnd_USD_Z, FundId_Z, Annual_Ret_2007_USD_Z, Annual_Ret_2009_USD_Z, Annual_Ret_2010_USD_Z, Annual_Ret_2011_USD_Z, Annual_Ret_2012_USD_Z, Annual_Ret_2013_USD_Z, Annual_Ret_2014_USD_Z, Annual_Ret_2015_USD_Z, Annual_Ret_2016_USD_Z, Annual_Ret_2017_USD_Z, Tracking_Error_1_Yr_MoEnd_USD_Z, Tracking_Error_10_Yr_MoEnd_USD_Z, Tracking_Error_3_Yr_MoEnd_USD_Z, Tracking_Error_5_Yr_MoEnd_USD_Z, Downside_Capture_Ratio_3_Yr_MoEnd_USD_Z, Downside_Capture_Ratio_10_Yr_MoEnd_USD_Z, Downside_Capture_Ratio_15_Yr_MoEnd_USD_Z, Best_3_Mo_Ret_Inception_MoEnd_USD_Z, Inception_Date_Z, Worst_3_Mo_Ret_Inception_MoEnd_USD_Z, Est_FundLevel_Net_Flow_YTD_MoEnd_USD_Z, Batting_Average_3_Yr_MoEnd_USD_Z, Batting_Average_5_Yr_MoEnd_USD_Z, Batting_Average_10_Yr_MoEnd_USD_Z, Fund_Size_USD_Z, Volatility_Rank__MoEnd_Z, RSquared_1_Yr_MoEnd_USD_Z, RSquared_3_Yr_MoEnd_USD_Z, RSquared_5_Yr_MoEnd_USD_Z, RSquared_10_Yr_MoEnd_USD_Z, Total_Ret_Annlzd_15_Yr_MoEnd_USD_Z, Std_Dev_1_Yr_MoEnd_USD_Z, Std_Dev_5_Yr_MoEnd_USD_Z, Std_Dev_10_Yr_MoEnd_USD_Z, Asset_Alloc_NonUS_Equity__Net_Z, Asset_Alloc_US_Equity__Net_Z, Asset_Alloc_Bond__Net_Z, Asset_Alloc_Cash__Net_Z, Asset_Alloc_Other__Net_Z, Equity_Style_Large_Core__Net_Z, Equity_Style_Large_Growth__Net_Z, Equity_Style_Large_Value__Net_Z, Equity_Style_Mid_Core__Net_Z, Equity_Style_Mid_Growth__Net_Z, Equity_Style_Mid_Value__Net_Z, Equity_Style_Small_Core__Net_Z, Equity_Style_Small_Growth__Net_Z, Equity_Style_Small_Value__Net_Z, Socially_Conscious_Z, Morningstar_Sustainability_Rating_Z, Portfolio_Sustainability_Score_Z, Equity_Region_Emerging__Net_Z, Equity_Region_Developed__Net_Z, Asset_Alloc_US_Bond__Net_Z, Average_Eff_Duration_Z, Average_Eff_Maturity_Z, Credit_Qual_AAA__Z, Credit_Qual_AA__Z, Credit_Qual_A__Z, Credit_Qual_BBB__Z, Credit_Qual_BB__Z, Credit_Qual_B__Z, Credit_Qual_Below_B__Z, Credit_Qual_Not_Rated__Z, Equity_Region_North_America__Net_Z, Equity_Region_Latin_America__Net_Z, Equity_Region_Japan__Net_Z, Equity_Region_Australasia__Net_Z, Equity_Region_Asia_dev__Net_Z, Equity_Region_Asia_emrg__Net_Z, Equity_Region_United_Kingdom__Net_Z, Equity_Region_Europe_dev__Net_Z, Equity_Region_Europe_emrg__Net_Z, Equity_Region_AfricaMiddle_East__Net_Z, Equity_Country_Canada__Net_Z, Equity_Country_United_States__Net_Z, _Asset_in_Top_10_Holdings_Z, Equity_Region_Not_Classified__Net_Z, Total_Ret__Rank_Cat_YTD_MoEnd_Z, Total_Ret__Rank_Cat_10_Yr_MoEnd_Z, Morningstar_Analyst_Rating_Z, Style_Consistency_Long_Z, Primary_Prospectus_Benchmark_Z, Analyst_Assigned_Benchmark_Z, Secondary_Prospectus_Benchmark_Z, Alpha_1_Yr_MoEnd_USD_Z, Alpha_3_Yr_MoEnd_USD_Z, Alpha_5_Yr_MoEnd_USD_Z, Alpha_10_Yr_MoEnd_USD_Z, Beta_1_Yr_MoEnd_USD_Z, Beta_3_Yr_MoEnd_USD_Z, Beta_5_Yr_MoEnd_USD_Z, Beta_10_Yr_MoEnd_USD_Z, _of_Bond_Holdings_Long_Z, Average_Credit_Quality_Z, FixedIncAgency_MortgageBacked__Net_Z, FixedIncAssetBacked__Net_Z, Fixed_Bank_Loan__Net_Z, FixedInc_ash__Equivalents__Net_Z, FixedIncComme_MortgageBacked__Net_Z, FixedIncConvertible__Net_Z, FixedInc_Corporate_Bond__Net_Z, FixedIncCovered_Bond__Net_Z, FixedInc_ForwardFuture__Net_Z, FixedIncGovernment__Net_Z, FixedIncGovernment_Related__Net_Z, FixedIncMunicipal_Taxable__Net_Z, FixedIncMortgageBacked__Net_Z, FixedIncSector_OptionWarrant__Net_Z, FixedIncSector_Preferred_Stock__Net_Z, FixedInc_Swap__Net_Z, Prospectus_Objective_Z, EquityBasic_Materials__Net_Z, EqCommunication_Services__Net_Z, EqConsumer_Cyclical__Net_Z, EquityConsumer_Defensive__Net_Z, Equity_Sector_Energy__Net_Z, EquityFinancial_Services__Net_Z, Equity_Sector_Healthcare__Net_Z, Equity_Sector_Industrials__Net_Z, Equity_Sector_Real_Estate__Net_Z, Equity_Sector_Technology__Net_Z, Equity_Sector_Utilities__Net_Z, Equity_Region_Greater_Europe__Net_Z, Equity_Region_Greater_Asia__Net_Z, Sharpe_Ratio_5_Yr_MoEnd_USD_Z, Sharpe_Ratio_10_Yr_MoEnd_USD_Z, NAV_MoEnd_USD_Z)
    VALUES
    (
    'ACISX', 'AB Corporate Income', -0.33, -2.86, -0.27, 2.17, 3.03, 3.71, 0, 5.25, '', '', '', '', -0.28, 99.08, 1.03, 79, 0.41, '', 5.92, 62081590, '', 'Medium Moderate', 'US Fund Intermediate-Term Bond', '', 'BBgBarc US Credit TR USD', 'Fixed Income', 'No', 'No', -10.75, 0.56, 135.27, 142.46, 'FSUSA07I1K', 3.54, 28.97, 10.79, 2.33, 10.52, -2.32, 8.78, -0.81, 5.75, 6.34, 1.29, 4.53, 1.71, 1.87, 129.91, 166.45, '', 14.52, '12/11/2006', -13.79, 5702655, 47.22, 55, 59.17, 87891308, '', 78.08, 81.71, 84.63, 51.58, '', 2.72, 4.09, 6.23, 0, 0, 89.27, 3.94, 6.79, '', '', '', '', '', '', '', '', '', 'No', 'Below Average', 47.16, '', '', 72.37, 7.14, 10.16, 1.13, 5.19, 44.86, 47.84, 0.57, 0, 0, 0.41, '', '', '', '', '', '', '', '', '', '', '', '', -1.4, '', '', '', '', '', 'BBgBarc US Credit TR USD', 'BBgBarc US Agg Bond TR USD', '', 0.16, 0.64, 0.54, 0.37, 1.02, 1.22, 1.34, 1.37, 492, 'BBB', 0, 0, 0, 3.94, 0.24, 1.37, 89.9, 0, 0, 1.14, -1.82, 0, 0, 0, 0.27, 0.14, 'Income', '', '', '', '', '', '', '', '', '', '', '', '', '', 0.64, 0.8, 10.81, 1, 2, 1, -1.5, -2.5, -0.5, 0.5, 1, 2, -2, 0.5, -1.5, -1.5, -1.5, -1.5, -0.5, 0.5, 1, -0.5, 0, -3.5, -0.5, -0.5, '', '', '', -3, '', '', '', '', -1.5, 0.5, 2, 2, '', -1, 2, 1, -1.5, 1, -1, 2, -0.5, 1, 2, 1, 1.5, 0.5, 1, 2, 1.5, -2, 2, 0.5, -2.5, 0, -0.5, 0, 0, -0.5, -2.5, -0.5, 0, 0, -0.5, -2, 2, 1.5, 1.5, 0, 0, -0.5, 0, 2.5, -1.5, -1.5, -1.5, -1, -1, -2, -2, -1.5, -1.5, '', '', 0, -1, -1, -1, 1, 0.5, -2.5, -0.5, 3.5, 3, -1, -0.5, -0.5, -0.5, -1, -1, -0.5, -0.5, -1, -0.5, -1, -1, -0.5, -1, -1, -0.5, -1.5, '', -1.5, -1.5, '', '', '', '', '', 0, 0.5, 0.5, -0.5, 1.5, 2.5, 2, 1, -0.5, '', -1, -1, -0.5, 0, -1, 2, 3.5, -0.5, 0, -1.5, -0.5, -0.5, -0.5, 0, 0, 0, '', -1, -1, -1, -0.5, -1, -1, -1, -0.5, -1, -1, -1, -1, -1, 0, -0.5, 0
    );
    Ok, I have 326 commas in both the columns and values, and the create table above.
    Last edited by HalPlz; Jun 14th, 2018 at 06:16 AM.

  9. #7
    Super Moderator vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,375
    Thanks
    3
    Thanked 47 Times in 47 Posts
    Quote Originally Posted by HalPlz View Post
    I had the skipping lines/queries set to 0. I will try it set to 3, although when I open my CSV I don't see blank lines at the top or blank columns on the left.

    I have it set to Comma, which is the default for me, but I don't see anything about replacing the table with data file.

    Thank you both!
    I was just going by what I saw when I opened up your file in Excel (the first version, anyway). There were 2 blank rows in that version, plus the row that had the column titles, hence my suggestion to skip the first 3 rows when loading the csv into your mySQL table.

    I was able to load your data into a test table on my server. I don't know what it's supposed to look like, but the data looks fine to me.

    Is your problem fixed now or do you still need some help?
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    SNAP to it!

  10. #8
    New Coder
    Join Date
    Jun 2016
    Posts
    44
    Thanks
    16
    Thanked 0 Times in 0 Posts
    It uploaded successfully!

    However, it inserted 0's into the blank values. I will have to re-upload it but retain the blank cells as blank. When I used the CSV --> SQL converter, I did not see an option about how to treat blank cells. Can I just add something to my SQL file and re-upload?


    If I wanted null values instead of blanks, would I just put this, "DEFAULT NULL" at the end of the create table statements?

    Code:
    /* CREATE TABLE */
    CREATE TABLE MorningstarData630(
    Ticker VARCHAR(100), DEFAULT NULL
    Name VARCHAR(100), DEFAULT NULL
    Total_Ret_3_Mo_MoEnd_USD DOUBLE, DEFAULT NULL
    Edit: well it looks like I will have to find a better CSV -> Converting program.
    Last edited by HalPlz; Jun 14th, 2018 at 08:23 PM.

  11. #9
    Super Moderator vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,375
    Thanks
    3
    Thanked 47 Times in 47 Posts
    I found a post on Stack Overflow which should address your problem. I actually tried this on a few records in my own test database and it worked for me.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    SNAP to it!


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •