Showing posts with label names. Show all posts
Showing posts with label names. Show all posts

Sunday, March 11, 2012

AS400/DB2 different column names in different configurations

Hello!

I am creating a package that will be executed against different AS400/DB2 databases. (I use a Foreach Loop). The AS400/DB2 is configured a little bit differently. This results in that the same column can have different name in different AS400/DB2. For example the column nameA4£ADG, A4$ADG and A4?ADG is the same column.

In the Data Flow I use DataReader. Does anyone know how to get past this issue without creating one package for each column name?

Best regard

Tina

I'm not an AS400 person (or DB2), so I have no idea if this will work. But, it seems like you could use an expression to set the SQL Statement on the DataReader source, and alias the differently named columns to the same name. To set an expression on the data reader, you have to select the data flow task in the control flow, go to properties, and go to expressions.|||

Hello!

Thank you for your help!

But know I have solved it. I use different Data Flow for each set of column names. Depending on the company that is executed I defined the Precedence Constraint to "Expression and Constraint" and use the Expression:

@.[User::varCompanyName]=="CDHU"

In the Data Reader I have to set ValidateExternalMetadata to False

Best regards,

Tina

Sunday, February 12, 2012

Are these indexes?

SQL 2000
In EM, when I click the Database, the right pane shows 3
tabs and under the Tab "Table Info" it shows info on the
table and shows the names of the indexes, but it also
shows names like this with an index grapic next to it:
_WA_sys_Attr_300424B4
What is this? It's not an index that I've created.
Thx,
DonHi Don
No, it's not an index and doesn't take storage space like an index. Is is
just statistics on an unindexed column which can be useful for the optimizer
when coming up with a good plan.
You can read about statistics in the Books Online.
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Don" <anonymous@.discussions.microsoft.com> wrote in message
news:03d501c4a02b$049889c0$a401280a@.phx.gbl...
> SQL 2000
> In EM, when I click the Database, the right pane shows 3
> tabs and under the Tab "Table Info" it shows info on the
> table and shows the names of the indexes, but it also
> shows names like this with an index grapic next to it:
> _WA_sys_Attr_300424B4
> What is this? It's not an index that I've created.
> Thx,
> Don
>|||Hi,
These are statistics (name start with _WA) and are not indexes. If
you have auto create statistics on option set for the database and query on
a column that column has no index then sql server will create the statistic
for that column start with the name _WA_SYS_.
Thanks
Hari
MCDBA
"Don" wrote:
> SQL 2000
> In EM, when I click the Database, the right pane shows 3
> tabs and under the Tab "Table Info" it shows info on the
> table and shows the names of the indexes, but it also
> shows names like this with an index grapic next to it:
> _WA_sys_Attr_300424B4
> What is this? It's not an index that I've created.
> Thx,
> Don
>

Are these indexes?

SQL 2000
In EM, when I click the Database, the right pane shows 3
tabs and under the Tab "Table Info" it shows info on the
table and shows the names of the indexes, but it also
shows names like this with an index grapic next to it:
_WA_sys_Attr_300424B4
What is this? It's not an index that I've created.
Thx,
Don
Hi Don
No, it's not an index and doesn't take storage space like an index. Is is
just statistics on an unindexed column which can be useful for the optimizer
when coming up with a good plan.
You can read about statistics in the Books Online.
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Don" <anonymous@.discussions.microsoft.com> wrote in message
news:03d501c4a02b$049889c0$a401280a@.phx.gbl...
> SQL 2000
> In EM, when I click the Database, the right pane shows 3
> tabs and under the Tab "Table Info" it shows info on the
> table and shows the names of the indexes, but it also
> shows names like this with an index grapic next to it:
> _WA_sys_Attr_300424B4
> What is this? It's not an index that I've created.
> Thx,
> Don
>
|||Hi,
These are statistics (name start with _WA) and are not indexes. If
you have auto create statistics on option set for the database and query on
a column that column has no index then sql server will create the statistic
for that column start with the name _WA_SYS_.
Thanks
Hari
MCDBA
"Don" wrote:

> SQL 2000
> In EM, when I click the Database, the right pane shows 3
> tabs and under the Tab "Table Info" it shows info on the
> table and shows the names of the indexes, but it also
> shows names like this with an index grapic next to it:
> _WA_sys_Attr_300424B4
> What is this? It's not an index that I've created.
> Thx,
> Don
>