dbTalk Databases Forums  

Renaming OutputColumns in DataReader Source

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Renaming OutputColumns in DataReader Source in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mirek Endys
 
Posts: n/a

Default Renaming OutputColumns in DataReader Source - 09-23-2008 , 04:12 PM






Im trying to rename output columns in DataReader Source to be more readable.
For example: in the source table is column named GLMPUJ. After connecting
DataReader Source (SELECT GLMPUJ FROM tblSourceTable), there is External
Column named GLMPUJ and Output Column named GLMPUJ.
I renamed Output Column GLMPUJ to name DocumentNumber.

When Im using this DocumentNumber in data flows in design mode, it working
well. But when Im running package, the DataReader Source fails and says that
tblSourceTable does not contains column DocumentNumber.

Columns are connected well, the relation is created. I thought, that I can
rename output columns with no problem.

What is wrong???

Thanks for answer

Mike


Reply With Quote
  #2  
Old   
Mike Endys
 
Posts: n/a

Default Re: Renaming OutputColumns in DataReader Source - 09-24-2008 , 04:02 AM






I did it by AS keyword... SELECT GLMPUJ AS DocumentNumber FROM
tblSourceTable


"Mirek Endys" <MikeEndy (AT) nospam (DOT) nospam> wrote

Quote:
Im trying to rename output columns in DataReader Source to be more
readable.
For example: in the source table is column named GLMPUJ. After connecting
DataReader Source (SELECT GLMPUJ FROM tblSourceTable), there is External
Column named GLMPUJ and Output Column named GLMPUJ.
I renamed Output Column GLMPUJ to name DocumentNumber.

When Im using this DocumentNumber in data flows in design mode, it working
well. But when Im running package, the DataReader Source fails and says
that
tblSourceTable does not contains column DocumentNumber.

Columns are connected well, the relation is created. I thought, that I can
rename output columns with no problem.

What is wrong???

Thanks for answer

Mike



Reply With Quote
  #3  
Old   
Mike Endys
 
Posts: n/a

Default Re: Renaming OutputColumns in DataReader Source - 09-24-2008 , 04:02 AM



I did it by AS keyword... SELECT GLMPUJ AS DocumentNumber FROM
tblSourceTable


"Mirek Endys" <MikeEndy (AT) nospam (DOT) nospam> wrote

Quote:
Im trying to rename output columns in DataReader Source to be more
readable.
For example: in the source table is column named GLMPUJ. After connecting
DataReader Source (SELECT GLMPUJ FROM tblSourceTable), there is External
Column named GLMPUJ and Output Column named GLMPUJ.
I renamed Output Column GLMPUJ to name DocumentNumber.

When Im using this DocumentNumber in data flows in design mode, it working
well. But when Im running package, the DataReader Source fails and says
that
tblSourceTable does not contains column DocumentNumber.

Columns are connected well, the relation is created. I thought, that I can
rename output columns with no problem.

What is wrong???

Thanks for answer

Mike



Reply With Quote
  #4  
Old   
Mike Endys
 
Posts: n/a

Default Re: Renaming OutputColumns in DataReader Source - 09-24-2008 , 04:02 AM



I did it by AS keyword... SELECT GLMPUJ AS DocumentNumber FROM
tblSourceTable


"Mirek Endys" <MikeEndy (AT) nospam (DOT) nospam> wrote

Quote:
Im trying to rename output columns in DataReader Source to be more
readable.
For example: in the source table is column named GLMPUJ. After connecting
DataReader Source (SELECT GLMPUJ FROM tblSourceTable), there is External
Column named GLMPUJ and Output Column named GLMPUJ.
I renamed Output Column GLMPUJ to name DocumentNumber.

When Im using this DocumentNumber in data flows in design mode, it working
well. But when Im running package, the DataReader Source fails and says
that
tblSourceTable does not contains column DocumentNumber.

Columns are connected well, the relation is created. I thought, that I can
rename output columns with no problem.

What is wrong???

Thanks for answer

Mike



Reply With Quote
  #5  
Old   
Mike Endys
 
Posts: n/a

Default Re: Renaming OutputColumns in DataReader Source - 09-24-2008 , 04:02 AM



I did it by AS keyword... SELECT GLMPUJ AS DocumentNumber FROM
tblSourceTable


"Mirek Endys" <MikeEndy (AT) nospam (DOT) nospam> wrote

Quote:
Im trying to rename output columns in DataReader Source to be more
readable.
For example: in the source table is column named GLMPUJ. After connecting
DataReader Source (SELECT GLMPUJ FROM tblSourceTable), there is External
Column named GLMPUJ and Output Column named GLMPUJ.
I renamed Output Column GLMPUJ to name DocumentNumber.

When Im using this DocumentNumber in data flows in design mode, it working
well. But when Im running package, the DataReader Source fails and says
that
tblSourceTable does not contains column DocumentNumber.

Columns are connected well, the relation is created. I thought, that I can
rename output columns with no problem.

What is wrong???

Thanks for answer

Mike



Reply With Quote
  #6  
Old   
Mike Endys
 
Posts: n/a

Default Re: Renaming OutputColumns in DataReader Source - 09-24-2008 , 04:02 AM



I did it by AS keyword... SELECT GLMPUJ AS DocumentNumber FROM
tblSourceTable


"Mirek Endys" <MikeEndy (AT) nospam (DOT) nospam> wrote

Quote:
Im trying to rename output columns in DataReader Source to be more
readable.
For example: in the source table is column named GLMPUJ. After connecting
DataReader Source (SELECT GLMPUJ FROM tblSourceTable), there is External
Column named GLMPUJ and Output Column named GLMPUJ.
I renamed Output Column GLMPUJ to name DocumentNumber.

When Im using this DocumentNumber in data flows in design mode, it working
well. But when Im running package, the DataReader Source fails and says
that
tblSourceTable does not contains column DocumentNumber.

Columns are connected well, the relation is created. I thought, that I can
rename output columns with no problem.

What is wrong???

Thanks for answer

Mike



Reply With Quote
  #7  
Old   
Mike Endys
 
Posts: n/a

Default Re: Renaming OutputColumns in DataReader Source - 09-24-2008 , 04:02 AM



I did it by AS keyword... SELECT GLMPUJ AS DocumentNumber FROM
tblSourceTable


"Mirek Endys" <MikeEndy (AT) nospam (DOT) nospam> wrote

Quote:
Im trying to rename output columns in DataReader Source to be more
readable.
For example: in the source table is column named GLMPUJ. After connecting
DataReader Source (SELECT GLMPUJ FROM tblSourceTable), there is External
Column named GLMPUJ and Output Column named GLMPUJ.
I renamed Output Column GLMPUJ to name DocumentNumber.

When Im using this DocumentNumber in data flows in design mode, it working
well. But when Im running package, the DataReader Source fails and says
that
tblSourceTable does not contains column DocumentNumber.

Columns are connected well, the relation is created. I thought, that I can
rename output columns with no problem.

What is wrong???

Thanks for answer

Mike



Reply With Quote
  #8  
Old   
Mike Endys
 
Posts: n/a

Default Re: Renaming OutputColumns in DataReader Source - 09-24-2008 , 04:02 AM



I did it by AS keyword... SELECT GLMPUJ AS DocumentNumber FROM
tblSourceTable


"Mirek Endys" <MikeEndy (AT) nospam (DOT) nospam> wrote

Quote:
Im trying to rename output columns in DataReader Source to be more
readable.
For example: in the source table is column named GLMPUJ. After connecting
DataReader Source (SELECT GLMPUJ FROM tblSourceTable), there is External
Column named GLMPUJ and Output Column named GLMPUJ.
I renamed Output Column GLMPUJ to name DocumentNumber.

When Im using this DocumentNumber in data flows in design mode, it working
well. But when Im running package, the DataReader Source fails and says
that
tblSourceTable does not contains column DocumentNumber.

Columns are connected well, the relation is created. I thought, that I can
rename output columns with no problem.

What is wrong???

Thanks for answer

Mike



Reply With Quote
  #9  
Old   
Mike Endys
 
Posts: n/a

Default Re: Renaming OutputColumns in DataReader Source - 09-24-2008 , 04:02 AM



I did it by AS keyword... SELECT GLMPUJ AS DocumentNumber FROM
tblSourceTable


"Mirek Endys" <MikeEndy (AT) nospam (DOT) nospam> wrote

Quote:
Im trying to rename output columns in DataReader Source to be more
readable.
For example: in the source table is column named GLMPUJ. After connecting
DataReader Source (SELECT GLMPUJ FROM tblSourceTable), there is External
Column named GLMPUJ and Output Column named GLMPUJ.
I renamed Output Column GLMPUJ to name DocumentNumber.

When Im using this DocumentNumber in data flows in design mode, it working
well. But when Im running package, the DataReader Source fails and says
that
tblSourceTable does not contains column DocumentNumber.

Columns are connected well, the relation is created. I thought, that I can
rename output columns with no problem.

What is wrong???

Thanks for answer

Mike



Reply With Quote
  #10  
Old   
Roy Harvey (SQL Server MVP)
 
Posts: n/a

Default Re: Renaming OutputColumns in DataReader Source - 09-24-2008 , 06:41 AM



On Wed, 24 Sep 2008 11:02:28 +0200, "Mike Endys"
<MikeEndy (AT) nospam (DOT) nospam> wrote:

Quote:
I did it by AS keyword... SELECT GLMPUJ AS DocumentNumber FROM
tblSourceTable
That is one of three ways to assign an alias to an output column.

SELECT GLMPUJ AS DocumentNumber

SELECT GLMPUJ DocumentNumber

SELECT AS DocumentNumber = GLMPUJ

As you see in the second example AS is optional. Of the three that is
the one I do not use. That format also provides the annoying behavior
that a comma between two column in a SELECT list results in the former
column receiving the later column's name as an alias. That can be
very confusing.

I think that I have heard that the third format using = is not
standard SQL, but I am not certain. It can be the cleanest to read if
you format your SELECT neatly, as it is always right there up front
even when the expression is long and complicated.

Roy Harvey
Beacon Falls, CT


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.