You are here: Re: BULK INSERT Question « MsSQL Server « IT news, forums, messages
Re: BULK INSERT Question

Posted by Simon Hayes on 09/26/57 11:16

"akej via SQLMonster.com" <forum@nospam.SQLMonster.com> wrote in message
news:97f86ad1e7ec4a7497b655baa10a64fb@SQLMonster.com...
> Hi, i have table with 15 columns
>
> CREATE TABLE [dbo].[myTable] (
> [m] [bigint] PRIMARY KEY ,
> [c1] [bigint] NULL ,
> [c2] [bigint] NULL ,
> [c3] [bit] NULL ,
> [c4] [tinyint] NULL ,
> [c5] [nvarchar] (50) NULL ,
> [c6] [bit] NULL
> ................
> ...................
>
> now i want to run BULK INSERT from file that consist only values for first
> column e.g.
>
> 22222222222
> 33333333333
> 44444444444
> ...........
> ...........
>
> and i need that other columns will sets to it's default values i.e. NULL
>
>
> Any ideas ?????
>
> Thanks
>
> --
> Message posted via http://www.sqlmonster.com


You need to use a format file - see "Using Format Files" and "Using a Data
File with Fewer Fields" in Books Online. DTS is another option, and probably
quicker if this is a one-off task.

Simon

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация