OLE DB Source component simple application

Source: Internet
Author: User
Tags ole

OLE DB Source component is primarily fetching data from DB, passing it to downstream components, and the strength of OLE DB Source component is that query data has four mode,

Table or view: Pass directly to table or view

Table name or view name variable: The name of a table or view is stored in a variable of the package

SQL command: Enter the SQL command, and you can use the parameters in the SQL command in the parameters. Represent

SQL command from variable: Save SQL command in one variable of the package

In these four Data Access Mode, each has its own purpose:

1,table or view

The simplest way to get the entire table or view data directly, but you can select only a subset of the columns in columns, which reduces the amount of data passed to downstream components, and four data Access modes can partially pass the columns.

2,table name or view name from variable

This mode, which stores the table name or view name in the variable of the package, can dynamically change the value of variable in the package, but the vision is fine, but because DataSource Determines the structure of the columns, so, dynamically change the value of variable in the package, from the different datasource query data, you must ensure that the structure of the columns is the same, otherwise, the "fail in running

3,sql command

This mode has great flexibility and applicability because SQL command mode can use parameter, which is an exciting design.

Parameters are specified by parameters, and parameters passed to SQL command can be stored in a package variable, dynamically modifying the value of the package variable in the package to query different data.

Example: Parameters do not use @variablename, but use one? , which is the special point of OLE DB source, each one? All represent a parameter, because? The order in which SQL command appears is fixed, so you can navigate to each parameter by ordinal 0,1,2 (ordinal starting from 0).

The map parameter in parameters? Serial number and package variable, which in turn will pass the value of the package variable to SQL command.

4,sql command from variable

This mode is to store SQL command in the package variable and cannot use parameter

OLE DB Source component simple application

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.