User Profile

Collapse

Profile Sidebar

Collapse
uksql
uksql
Last Activity: Sep 27 '12, 07:02 PM
Joined: Sep 26 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • uksql
    replied to Load csv file into a table
    Rabbit - but my version of SQL Serverin which I am trying to insert is 2008 R2 not 2005.


    And thank you next time i'll make sure I use code snippets.
    See more | Go to post

    Leave a comment:


  • uksql
    replied to Load csv file into a table
    But the value I a mtrying to insert is very small.
    Below is the create table stmt.

    Code:
    CREATE TABLE [dbo].[CLIENT_KEY](
    	[CLNT_REF_ID] [varchar](256) NOT NULL,
    	[CLIENT_KEY] [varchar](256) NULL,
    	[START_DATE] [datetime] NULL,
    	[END_DATE] [datetime] NULL,
    	[USM_CREATOR] [varchar](10) NULL,
    	[USM_CREATE_TS] [datetime] NULL,
    	[USM_UPDATOR] [varchar](50) NULL,
    	[USM_UPDATE_TS]
    ...
    See more | Go to post
    Last edited by Rabbit; Sep 26 '12, 04:04 PM. Reason: Please use code tags when posting code.

    Leave a comment:


  • uksql
    started a topic Load csv file into a table

    Load csv file into a table

    All,

    When I try to load data into a table using a csv file I get below errors.

    Code:
    bulk insert client_key
    from 'T:\CLIENT_KEY.txt'
    WITH (
    	FIELDTERMINATOR =',',
    	ROWTERMINATOR = '\r\n',
    	DATAFILETYPE  = 'widenative')
    Msg 4866, Level 16, State 4, Line 1
    The bulk load failed. The column is too long in the data file for row 1, column 1. Verify that the field terminator...
    See more | Go to post
    Last edited by Rabbit; Sep 26 '12, 04:03 PM. Reason: Please use code tags when posting code.
No activity results to display
Show More
Working...