Home All Groups Group Topic Archive Search About
Author
30 May 2005 9:00 AM
Govardhan MV
Hi,

I want to write a BCP format file, which uses one data column Value to map to
Two Column Fields in the table.

For Example:
        Data File: Pin Value – “5600055”
Table Columns
1) tmp_pin
2) per_pin

Is the above possible to specify in the format file? Does this flexibility
is provided by BCP Utility to load the data.

Regards
Govardhan MV

Author
30 May 2005 11:07 AM
Tom Moreau
This type of functionality is best done with DTS.

--
   Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON   Canada
www.pinpub.com
..
"Govardhan MV" <Govardha***@discussions.microsoft.com> wrote in message
news:93A5A369-32DA-4859-BAAF-06CB36301C38@microsoft.com...
Hi,

I want to write a BCP format file, which uses one data column Value to map
to
Two Column Fields in the table.

For Example:
        Data File: Pin Value – “5600055”
Table Columns
1) tmp_pin
2) per_pin

Is the above possible to specify in the format file? Does this flexibility
is provided by BCP Utility to load the data.

Regards
Govardhan MV
Are all your drivers up to date? click for free checkup

Author
30 May 2005 11:15 AM
Govardhan MV
HI Tom,

But I want this on BCP not on DTS.

Regards
Govardhan MV


Show quoteHide quote
"Tom Moreau" wrote:

> This type of functionality is best done with DTS.
>
> --
>    Tom
>
> ----------------------------------------------------
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON   Canada
> www.pinpub.com
> ..
> "Govardhan MV" <Govardha***@discussions.microsoft.com> wrote in message
> news:93A5A369-32DA-4859-BAAF-06CB36301C38@microsoft.com...
> Hi,
>
> I want to write a BCP format file, which uses one data column Value to map
> to
> Two Column Fields in the table.
>
> For Example:
>         Data File: Pin Value – “5600055”
> Table Columns
> 1) tmp_pin
> 2) per_pin
>
> Is the above possible to specify in the format file? Does this flexibility
> is provided by BCP Utility to load the data.
>
> Regards
> Govardhan MV
>
>
Author
30 May 2005 11:37 AM
Tom Moreau
What are the datatypes and what are the widths, i.e. how do you map the
5600055 to the two values?

--
   Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON   Canada
www.pinpub.com
..
"Tom Moreau" <tom@dont.spam.me.cips.ca> wrote in message
news:OtOMKfQZFHA.3320@TK2MSFTNGP12.phx.gbl...
This type of functionality is best done with DTS.

--
   Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON   Canada
www.pinpub.com
..
"Govardhan MV" <Govardha***@discussions.microsoft.com> wrote in message
news:93A5A369-32DA-4859-BAAF-06CB36301C38@microsoft.com...
Hi,

I want to write a BCP format file, which uses one data column Value to map
to
Two Column Fields in the table.

For Example:
        Data File: Pin Value – “5600055”
Table Columns
1) tmp_pin
2) per_pin

Is the above possible to specify in the format file? Does this flexibility
is provided by BCP Utility to load the data.

Regards
Govardhan MV
Author
30 May 2005 11:50 AM
Govardhan MV
Hi Tomm

Both the datatype and size are same.

Regards
Govardhan MV


Show quoteHide quote
"Tom Moreau" wrote:

> What are the datatypes and what are the widths, i.e. how do you map the
> 5600055 to the two values?
>
> --
>    Tom
>
> ----------------------------------------------------
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON   Canada
> www.pinpub.com
> ..
> "Tom Moreau" <tom@dont.spam.me.cips.ca> wrote in message
> news:OtOMKfQZFHA.3320@TK2MSFTNGP12.phx.gbl...
> This type of functionality is best done with DTS.
>
> --
>    Tom
>
> ----------------------------------------------------
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON   Canada
> www.pinpub.com
> ..
> "Govardhan MV" <Govardha***@discussions.microsoft.com> wrote in message
> news:93A5A369-32DA-4859-BAAF-06CB36301C38@microsoft.com...
> Hi,
>
> I want to write a BCP format file, which uses one data column Value to map
> to
> Two Column Fields in the table.
>
> For Example:
>         Data File: Pin Value – “5600055”
> Table Columns
> 1) tmp_pin
> 2) per_pin
>
> Is the above possible to specify in the format file? Does this flexibility
> is provided by BCP Utility to load the data.
>
> Regards
> Govardhan MV
>
>
Author
31 May 2005 1:53 AM
Tom Moreau
That's nice.  What do you mean by "same" - int, char(5)... ?  How about
giving us DDL and how you want the string 5600055 to be divided up?

--
   Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON   Canada
www.pinpub.com
..
"Govardhan MV" <Govardha***@discussions.microsoft.com> wrote in message
news:18508099-5AA8-4C0C-9444-B6198F3DC099@microsoft.com...
Hi Tomm

Both the datatype and size are same.

Regards
Govardhan MV


Show quoteHide quote
"Tom Moreau" wrote:

> What are the datatypes and what are the widths, i.e. how do you map the
> 5600055 to the two values?
>
> --
>    Tom
>
> ----------------------------------------------------
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON   Canada
> www.pinpub.com
> ..
> "Tom Moreau" <tom@dont.spam.me.cips.ca> wrote in message
> news:OtOMKfQZFHA.3320@TK2MSFTNGP12.phx.gbl...
> This type of functionality is best done with DTS.
>
> --
>    Tom
>
> ----------------------------------------------------
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON   Canada
> www.pinpub.com
> ..
> "Govardhan MV" <Govardha***@discussions.microsoft.com> wrote in message
> news:93A5A369-32DA-4859-BAAF-06CB36301C38@microsoft.com...
> Hi,
>
> I want to write a BCP format file, which uses one data column Value to map
> to
> Two Column Fields in the table.
>
> For Example:
>         Data File: Pin Value – “5600055”
> Table Columns
> 1) tmp_pin
> 2) per_pin
>
> Is the above possible to specify in the format file? Does this flexibility
> is provided by BCP Utility to load the data.
>
> Regards
> Govardhan MV
>
>
Author
31 May 2005 9:42 AM
Robert Klemme
Tom Moreau wrote:
> That's nice.  What do you mean by "same" - int, char(5)... ?  How
> about giving us DDL and how you want the string 5600055 to be divided
> up?

As I understand the question OP doesn't want to split the single string
but to put the same data into two columns.  I wonder though what's the
benefit of two columns with exactly the same value...

Kind regards

    robert

Show quoteHide quote
>
>> What are the datatypes and what are the widths, i.e. how do you map
>> the 5600055 to the two values?
>>
>> --
>>    Tom
>>
>> ----------------------------------------------------
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>> SQL Server MVP
>> Columnist, SQL Server Professional
>> Toronto, ON   Canada
>> www.pinpub.com
>> ..
>> "Tom Moreau" <tom@dont.spam.me.cips.ca> wrote in message
>> news:OtOMKfQZFHA.3320@TK2MSFTNGP12.phx.gbl...
>> This type of functionality is best done with DTS.
>>
>> --
>>    Tom
>>
>> ----------------------------------------------------
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>> SQL Server MVP
>> Columnist, SQL Server Professional
>> Toronto, ON   Canada
>> www.pinpub.com
>> ..
>> "Govardhan MV" <Govardha***@discussions.microsoft.com> wrote in
>> message news:93A5A369-32DA-4859-BAAF-06CB36301C38@microsoft.com...
>> Hi,
>>
>> I want to write a BCP format file, which uses one data column Value
>> to map to
>> Two Column Fields in the table.
>>
>> For Example:
>>         Data File: Pin Value – “5600055”
>> Table Columns
>> 1) tmp_pin
>> 2) per_pin
>>
>> Is the above possible to specify in the format file? Does this
>> flexibility is provided by BCP Utility to load the data.
>>
>> Regards
>> Govardhan MV
Author
31 May 2005 11:08 AM
Tom Moreau
If that's the original intent, I'd wonder myself.  Let's get some real specs
and then we can figure it out.

--
   Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON   Canada
www.pinpub.com
..
"Robert Klemme" <bob.n***@gmx.net> wrote in message
news:uYu%23CUcZFHA.1412@TK2MSFTNGP12.phx.gbl...
Tom Moreau wrote:
> That's nice.  What do you mean by "same" - int, char(5)... ?  How
> about giving us DDL and how you want the string 5600055 to be divided
> up?

As I understand the question OP doesn't want to split the single string
but to put the same data into two columns.  I wonder though what's the
benefit of two columns with exactly the same value...

Kind regards

    robert

Show quoteHide quote
>
>> What are the datatypes and what are the widths, i.e. how do you map
>> the 5600055 to the two values?
>>
>> --
>>    Tom
>>
>> ----------------------------------------------------
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>> SQL Server MVP
>> Columnist, SQL Server Professional
>> Toronto, ON   Canada
>> www.pinpub.com
>> ..
>> "Tom Moreau" <tom@dont.spam.me.cips.ca> wrote in message
>> news:OtOMKfQZFHA.3320@TK2MSFTNGP12.phx.gbl...
>> This type of functionality is best done with DTS.
>>
>> --
>>    Tom
>>
>> ----------------------------------------------------
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>> SQL Server MVP
>> Columnist, SQL Server Professional
>> Toronto, ON   Canada
>> www.pinpub.com
>> ..
>> "Govardhan MV" <Govardha***@discussions.microsoft.com> wrote in
>> message news:93A5A369-32DA-4859-BAAF-06CB36301C38@microsoft.com...
>> Hi,
>>
>> I want to write a BCP format file, which uses one data column Value
>> to map to
>> Two Column Fields in the table.
>>
>> For Example:
>>         Data File: Pin Value – “5600055”
>> Table Columns
>> 1) tmp_pin
>> 2) per_pin
>>
>> Is the above possible to specify in the format file? Does this
>> flexibility is provided by BCP Utility to load the data.
>>
>> Regards
>> Govardhan MV
Author
30 May 2005 11:50 AM
Wayne Snyder
Yes you can define a fixed length file with  fixed length fields.

--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)

I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org

Show quoteHide quote
"Govardhan MV" <Govardha***@discussions.microsoft.com> wrote in message
news:93A5A369-32DA-4859-BAAF-06CB36301C38@microsoft.com...
> Hi,
>
> I want to write a BCP format file, which uses one data column Value to map
> to
> Two Column Fields in the table.
>
> For Example:
>        Data File: Pin Value - "5600055"
> Table Columns
> 1) tmp_pin
> 2) per_pin
>
> Is the above possible to specify in the format file? Does this flexibility
> is provided by BCP Utility to load the data.
>
> Regards
> Govardhan MV
>
Author
30 May 2005 12:20 PM
Govardhan MV
Hi Wayne Snyder,

How do we write the format file for this,
Can you please explane me in detail.

Data File contain
560030

Table abc
a1
b1
are teh columns

I want to load 560030 to a1, b1 using BCP . please Help me in writting
Format file for this.

Regards
Govardhan MV



Show quoteHide quote
"Wayne Snyder" wrote:

> Yes you can define a fixed length file with  fixed length fields.
>
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
>
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
>
> "Govardhan MV" <Govardha***@discussions.microsoft.com> wrote in message
> news:93A5A369-32DA-4859-BAAF-06CB36301C38@microsoft.com...
> > Hi,
> >
> > I want to write a BCP format file, which uses one data column Value to map
> > to
> > Two Column Fields in the table.
> >
> > For Example:
> >        Data File: Pin Value - "5600055"
> > Table Columns
> > 1) tmp_pin
> > 2) per_pin
> >
> > Is the above possible to specify in the format file? Does this flexibility
> > is provided by BCP Utility to load the data.
> >
> > Regards
> > Govardhan MV
> >
>
>
>

Bookmark and Share