Format file error, can't fix it!

Hello, I need to import data from text file.I'm using BULK INSERT + format file because I need to skip some fields in my data file.
But I can't fix error appearing during query execution, I've tried to find the answer in the Internet, but didn't succeed.
This is my text datafile: (example of record: 12 fields delimited by $, row is terminated with $ too, some of them are empty as you can see from this example))
5045669$1007449353$PS$TEAM$1$TRY$$$$UNKNOWN$$21226$ 
This is the format of my table in database:
[id, name, transaction_id] created with the following query:
USE MyDB;
GO
CREATE TABLE dbo.table1
id int NOT NULL,
name varchar(50) NOT NULL,
transaction_id int PRIMARY KEY NOT NULL
GO
in this table:
"transaction_id" should match 1st field in datafile (5045669 in my example)
"name" = 4th field (TEAM in my example)
"id" = 2nd field in datafile (1007449353 in ex.)
all other fields must be skipped.
I use myformat.fmt file, created manually:
9.0
12
2 SQLINT     0 4    "$" 1 id ""
4 SQLCHAR 2 50  "$" 2 name SQL_Latin1_General_CP1_CI_AS
3 SQLCHAR 2 50  "$" 0 Extra SQL_Latin1_General_CP1_CI_AS
1 SQLINT 0  4       "$" 3 transaction_id ""
5 SQLINT 0  4       "$" 0 Extra ""  
6 SQLCHAR 2 50  "$" 0 Extra SQL_Latin1_General_CP1_CI_AS
7 SQLCHAR 2 50  "$" 0 Extra SQL_Latin1_General_CP1_CI_AS
8 SQLCHAR 2 8    "$" 0 Extra SQL_Latin1_General_CP1_CI_AS
9 SQLCHAR 2 8    "$" 0 Extra SQL_Latin1_General_CP1_CI_AS
10 SQLINT 0 4      "$" 0 Extra ""
11 SQLINT 0 4      "$" 0 Extra ""
12 SQLINT 0 4      "$" 0 Extra "" 
I'm doing my import using this query:
BULK INSERT MyDB.dbo.table1
FROM 'C:\Documents and Settings\Наташа\project\data\data.TXT' 
WITH (FIELDTERMINATOR='$', ROWTERMINATOR='$', 
FORMATFILE='C:\Documents and Settings\Наташа\project\data\myformat.fmt');
GO
but I obtain the following error:
Msg 4823, Level 16, State 1, Line 1
Cannot bulk load. Invalid column number in the format file "C:\Documents and Settings\Наташа\project\data\myformat.fmt".
I don't know how to fix it! I tried to check whether I was inprecise while creating format file, but it seems to me that everything is correct, I've put myformat.fmt into the same directory with my text datafile (it was in "C:\SQL Server Management Studio\Projects" folder initially), but I still get this error.
Help me, please

Natasit,
Is this still an issue?
Thanks!
Ed Price, Power BI & SQL Server Customer Program Manager (Blog,
Small Basic,
Wiki Ninjas,
Wiki)
Answer an interesting question?
Create a wiki article about it!

Similar Messages

  • About Final Cut ProX: why a red line appears at the top o a file imported into a New Event? then when I restarted the Project that files comes as "Missed files" How can i fix it?

    About Final Cut ProX: why a red line appears at the top o a file imported into a New Event? then when I restarted the Project that files comes as "Missed files" How can i fix it? Thank you very much.

    Where are you importing from – a camera or computer? If you are optimizing at import, make sure the background processes are completed. (Command-9)
    Russ

  • When I try to sync my movies from my camera to my ipad, via my PC, it tells me the movie is in the wrong format. How can I fix this?

    I am unable to sync the movies from my camera onto my ipad, via my PC. A message keeps telling me the ipad won't play the movies because they are in the wrong format. Can someone help please?
    Cheers,
    Pete

    Pad2, the new iPad Supported Video Formats & Movie Formats
    H.264 video up to 1080p, 30 frames per second, High Profile level 4.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats;
    MPEG-4 video up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats;
    Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format
     Cheers, Tom

  • Acrobat Pro 9.4.5 crashes when I open PDF file - How can I fix it ??

    Dear Fellow Mac Users,
    I have a MacPro4,1 with a 2 X 2.226 Ghz Quad-Core Intel Xeon
    Processor and 16 GB 1066 MHz DDR3 Memory. On my MacPro4,1,
    I have Adobe CS4 Suite installed. I now have Adobe Acrobat
    version 9.4.5.
    Whenever I open a PDF file, reguardles of size, Adobe Acrobat
    version 9.4.5 freezes. This happens even with files less than
    1 MB and with any other Acrobat software open. This happens
    even if Adobe Acrobat is the only software that is open.
    Any ideas about how I can fix this problem?
    Best Wishes,
    Paul

    I'd try uninstalling and reinstalling Acrobat Pro, then reapply the updates to 9.4.5.

  • ODI Load File error (can't read heading rows)

    Hello!
    I created a file Datastore on ODI 11g from the following delimited file:
    EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO
    7369,SMITH,CLERK,7902,17-12-80,800,,20
    7499,ALLEN,SALESMAN,7698,20-02-81,1600,300,30
    7521,WARD,SALESMAN,7698,22-02-81,1250,500,30
    7566,JONES,MANAGER,7839,02-04-81,2975,,20
    7654,MARTIN,SALESMAN,7698,28-09-81,1250,1400,30
    7698,BLAKE,MANAGER,7839,01-05-81,2850,,30
    I defined the file format as "delimited", the number of lines (heading) as "1", the record separator as "MS-DOS" and the field separator as ",". I successfully reversed engeniner and I obtained the header columns.
    The problem I have occurs when I try to view the file data using the option "View Data" on the file Datastore. I get the following error message:
    java.sql.SQLException: ODI-40439: Could not read heading rows from file
      at com.sunopsis.jdbc.driver.file.FileResultSet.<init>(FileResultSet.java:164)
      at com.sunopsis.jdbc.driver.file.impl.commands.CommandSelect.execute(CommandSelect.java:57)
      at com.sunopsis.jdbc.driver.file.CommandExecutor.executeCommand(CommandExecutor.java:33)
      at com.sunopsis.jdbc.driver.file.FilePreparedStatement.executeQuery(FilePreparedStatement.java:135)
      at com.borland.dx.sql.dataset.o.f(Unknown Source)
      at com.borland.dx.sql.dataset.QueryProvider.e(Unknown Source)
      at com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)
      at com.borland.dx.dataset.StorageDataSet.refresh(Unknown Source)
      at com.borland.dx.sql.dataset.QueryDataSet.refresh(Unknown Source)
      at com.sunopsis.graphical.frame.edit.AbstractEditFrameGridBorland.initialize(AbstractEditFrameGridBorland.java:628)
      at com.sunopsis.graphical.frame.edit.AbstractEditFrameGridBorland.<init>(AbstractEditFrameGridBorland.java:868)
      at com.sunopsis.graphical.frame.edit.EditFrameTableData.<init>(EditFrameTableData.java:50)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      at oracle.odi.ui.editor.AbstractOdiEditor$1.run(AbstractOdiEditor.java:176)
      at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:655)
      at java.lang.Thread.run(Thread.java:724)
    Thanks

    It fails with both .txt and .csv
    ODI-1227: Task SrcSet0 (Loading) fails on the source FILE connection FILE_GENERIC.
    Caused By: java.sql.SQLException: ODI-40439: Could not read heading rows from file
      at com.sunopsis.jdbc.driver.file.FileResultSet.<init>(FileResultSet.java:164)
      at com.sunopsis.jdbc.driver.file.impl.commands.CommandSelect.execute(CommandSelect.java:57)
      at com.sunopsis.jdbc.driver.file.CommandExecutor.executeCommand(CommandExecutor.java:33)
      at com.sunopsis.jdbc.driver.file.FilePreparedStatement.executeQuery(FilePreparedStatement.java:135)
      at oracle.odi.query.JDBCTemplate.executeQuery(JDBCTemplate.java:189)
      at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:94)
      at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:1)
      at oracle.odi.runtime.agent.execution.DataMovementTaskExecutionHandler.handleTask(DataMovementTaskExecutionHandler.java:70)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
      at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:577)
      at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:468)
      at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2128)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
      at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
      at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
      at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
      at java.lang.Thread.run(Thread.java:724)
    Regards

  • Validation Error - can't fix the field and continue?

    I have created a validation test (field must be numeric). That works fine, if the field is NOT numeric, the error appears like it should and the field is zeroed. However, I can't seem to be able to fix the error (ie: enter a numeric value) and successfully add or change the record.
    Am I missing something?
    Thanks in advance.
    Deb

    Hi Daniel
    If you have multiple display fields in a lookup table then there is an extra step you need to perform in the Import Manager:
    Once you have mapped to both of the destination display fields, right click on a field in the "Source Hierarchy" list and choose "Create Compound Field" -> (in this scenario it will be your "Issue storage locations" object.)
    Once you have created the compound field, the Import Manager will create a new field named "Issue storage locations" and map it to the lookup table. You can then perform value mapping on this new compound field.
    If the object for which you want to create a compound field is disabled (greyed out) then you have not mapped to all of its display fields.
    HTH,
    Mark

  • I am having trouble on printing a pdf file. how can i fix it.

    How can I print PDF files with Microsoft Vista?

    Go here and download a version of Adobe Reader. Once it is installed, when you open a pdf file with it, you should be able to print to an installed printer.
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • Xml error can't fix

    So I created a flash banner and I want the whole banner to be clickable
    I made an invisble button on the timeline into a movie clip and insdie the movieclip in the actions layer my code is thi:
    mybutton.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    function mouseUpHandler(evt:MouseEvent){
    navigateToURL(new URLRequest(root.clickTAG),"_blank");
    <mybutton>.addEventListener(MouseEvent.MOUSE_UP, handleMouse);
    function handleMouse(event:MouseEvent):void{
      navigateToURL(new URLRequest(MovieClip(root).clickTAG),"_blank");
    I keep getting these erroes and not sure how to fix them
    Symbol 'ad_button', Layer 'Layer 1', Frame 1, Line 9    1100: Syntax error: XML does not have matching begin and end tags.
    Symbol 'ad_button', Layer 'Layer 1', Frame 1, Line 8    1084: Syntax error: expecting rightbrace before semicolon.
    I'm trying to create this AS 2
    on (release) {
    getURL (_root.clickTAG, "_blank");
    into AS3

    No errors and nothing happening would indicate that there is no clickTag parameter. Remove the conditional if you want to see errors.
    mybutton.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    function mouseUpHandler(evt:MouseEvent){
         var fvars:Object = LoaderInfo(this.root.loaderInfo).parameters;
         navigateToURL(new URLRequest(fvars.clickTAG),"_blank");
    It would seem that you haven't gotten the clickTag info into the swf instance. Here's a good example of how to accomplish what you're trying to do:
    http://www.flashinyourface.com/blog/2010/2/3/as3-clicktag-example.html

  • Itunes: feed has already been submitted error. can't fix it!

    after being on itunes for many years, apple recently took down my videocast. i've since corrected the problems. however, every time i try to resubmit it, i get the "feed has already been submitted" error.
    i've done everything that's been suggested. i've changed the feed title, pointed to a different source url ("original feed" in feedburner parlance), changed the show description and itunes category. however, i don't want to change the feedburner feed addresss because i don't want to lose all my itunes comments and subscribers, assuming i ever get this fixed.
    btw, my feedburner feed addresss that i want to resubmit to itunes is: http://feeds.feedburner.com/chillcastvideo
    i've tried contacting apple "support" but sad to say it's a joke, shuffling me around from person to person who gives me "advice" that doesn't work. for an otherwise great company, they're failing here.
    so if anyone has anything else for me to try, i'm all ears.
    thanks!
    ryan

    hi roger, are you saying apple automatically deletes comments and subcribers for podcasts that have been removed? i ask this because you helped the poster in this thread who was having the same issue: https://discussions.apple.com/thread/4943722?start=0&tstart=0
    and i looked up his show on itunes and all his older comments are there along with his subscribers. i'm just trying to figure out what he did and do the same.

  • MySQL Error - Can't fix it.

    I have this error when I try to login as root (I have just installed MySQL with pacman):
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
    I searched @ google and I found thousands of posts with this problem. I followed 2 ways to solve it but I can't.
    If anyone can help...!
    Thanks

    Enter current password for root (enter for none):
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    After restart you have to do again as root:
    /etc/rc.d/mysqld start
    and then:
    mysql_secure_installation
    There is no need for reinstall the whole thing!
    If you want to start mysql by every boot make sure you add mysqld too the deamons array in rc.conf!
    Last edited by May-C (2008-02-03 11:04:18)

  • Balancing field "profit center"  error can not fixed by define doc split.

    Dear all,
    I am creating invoice by FB60 and hit error
    I open Performance assistant, and follow the instruction that link to "Define Document Splitting Characteristics for General Ledger Accounting".
    I made the "Zero balances" as unchecked, save, and then I could post the vendor invoice.
    Then, I come back to FB60, try to generate the other invoice and hit the same error.
    I open "Define document spilliting ..." again, made Zero balances as checked, then I posted invoices successfully.
    But again, when I come back, I still got the same error.
    Filling the profit center in first line item couldn't solve the problem.
    Please help if you got any ideas about this error.
    Thank you a lot.
    Rgds,
    Linh
    Edited by: LinhDT on Jan 11, 2011 9:55 AM

    hi,
    Please check whether below mentioned SAP note can help
    36677  Structure of components for customer messages 10.01.2011
    1545820  PAM03: Error message GLT2201 when settling a requirement (2) 05.01.2011
    1039346  F&A: RCIPE00/RPCIPE01 - distribution of liabilities 05.01.2011
    1497092  RW-Schnittstelle: Buchungssplit im FI für Eingangsrechnungen 03.01.2011
    1070629  FAQs: New general ledger migration 21.12.2010
    1541401  PAM03: Error message GLT2201 when settling a requirement 20.12.2010
    1455357  BST Brazil: Balancing Field Not Filled 07.12.2010
    1525261  FPRV: Profit center (PRCTR) is inherited incorrectly 03.12.2010
    1353125  AC interface: Document split in FI for incoming invoices 29.11.2010
    111491  1KEK: Valuation differences gross / net 24.11.2010

  • My startup disk is full, yet i have deleted all my files, how can i fix this?

    I have a mac book air and 120 GB disk.
    I have tried to clean up my files and saved them to a external hard drive.
    My startup disk is saying its full, yet i have deleted all files to trash and then emptied trash.
    the storage is showing typical things like photos, movies, apps and 75GB of other.
    how can i clean up the disk to get back the full storage space?
    thanks in advance for your help, im hoping there is a mac expert that can assist.
    GG

    OS X: What is "other" space in About This Mac? - Apple Support
    Experts here recommend Omnidisksweeper for identifying hidden files. I haven't tried it personally but try a search through the forum for more feedback on this product.
    Be very careful with what application you choose regardless as many are worse than unreliable causing damage to the operating system itself. If you purchase a third party application for this venture make sure you buy it direct from the developer's website. Also make sure you have a working backup and you fully understand what it is you're deleting so you don't brick your Mac!
    best of luck!

  • Find My Friends is Unavailable due to a server error, can't fix!

    Hi,
    I have been experiencing this problem since September both on my old iPhone5 and now on my iPhone6. Find My Friends App will not allow me to accept an invite or send requests to add. When I try a find my Friends alert pop up displays saying "Find My Friends is Unavailable due to a server error"
    I have tried uninstalling the App and reinstalling but to no avail. The rest of my family have no issues. Any help appreciated.

    If you're near an Apple store, then login to Apple.com, find your nearest store, make an appointment with the Genius Bar & ask.

  • SCOT error "File format conversion error"

    Dear All,
    When a PDF file is sent as a FAX, the SCOT throws the following error with message XS 812:
    No delivery to <fax_number>
    Message no. XS812
    Diagnosis
    The message could not be delivered to recipient <fax_number>. The node gave the following reason (in the language of the node):
    File format conversion error
    Can anybody suggest what could be the problem?
    Note that the normal PCL and RAW data are being sent to the same FAX number without any problem.
    Thanks
    Sagar

    Hello,
    You need to specify the correct formats:
    Check this link:
    http://help.sap.com/saphelp_nw70/helpdata/EN/b0/f8ef3aabdfb20de10000000a11402f/frameset.htm
    Regards,
    Siddhesh

  • I am able to download all the album I bought from itune store. The album contains 13 songs but 4 of them would not load up into my ipod. How can I fix that?

    I am not able to download all the album I bought from itune store. The album contains 13 songs but 4 of them would not load up into my ipod. An error code will pop up notified me that "my Ipod cannot convert some of the file" How can I fix that?

    Hi there mayway3000,
    You may find the troubleshooting steps in the article below helpful.
    iPod does not play content purchased from the iTunes Store
    http://support.apple.com/kb/TS1510
    -Griff W.

Maybe you are looking for

  • CD/DVD PLAYER not working with new updates

    Yesterday or more accurately last night I updated my firm ware, Pro applications and system update at the same time. I'm very sad to say, now my brand new baby that I've had for mearly 2 weeks, does not have cd/dvd capabilities. It simply doesn't rec

  • Partner Function Complete scenario

    Hi, I need to use partner functions. But I am getting confused. Okay here is the scenario, I have Fed-ex as a vendor, as a central vendor. Each plant uses its own Fed-ex ordering addresses(OA) and Shipping point and Invoicing address. Now when a PO i

  • Command line printing - AdobeReader left open

    Hello everyone, I've a problem by printing pdfs using the command line. My VB-script contains a code line like following (including the quotation marks for document and printer): process=myShell.Exec("c:\Program Files\Adobe\Reader\Reader 8.0\AcroRd32

  • Need help with online gaming

    When I play a online game my ping go very high and its started few days ago. I dont now what i can do. My internet is good. Can anyone help me? Also mi cant geth my memory higher. It says: 3,00 GB (2,60 GB avallible) how can i get it higher?

  • Create a gradient between inner and outer ellipses

    ...or any other enclosed shapes. Product: Adobe Photoshop Elements 3.0 O.S.: Windows XP, SP 3 I've searched the product Help and this forum, but am unable to find a solution to my problem. I'd like to use Adobe Photoshop Elements 3.0 to create an ell