显示标签为“missing”的博文。显示所有博文
显示标签为“missing”的博文。显示所有博文

2012年3月25日星期日

Flat File Source option missing in the Sql Server Import & Export Wizard.

Hi All,

I want to import a txt file data to a sql server database table, to do this i used sql server import and export wizard. In this when we choose a Data Source, the option Flat file source is not coming up in the combo box in the wizard.

I am using sql server 2005, Management Studio to do this.

steps 1. right click on the database --> all tasks --> import data --> sql server import export wizard --> choose data source dialog box....

please help me.

thanks in advance.

On my installation, flat file source is 4th on the list below the .Net Framework providers for odbc, oracle & sql serversql

2012年3月9日星期五

fix missing value

Can SSIS detect the missing value and replace it with some reasonable value (e.g., maximum, median, average, etc.)?
thanks

You haven't given enough information.
Where is the missing value?

|||Sorry that I was not clear. The missing value exists in a table. For example, one column of one row does not have any data. This can cause problem when I try to use this table for some task, e.g., train a data mining model. So I want to find a way to detect these places and fill them with some reasonable value.
Thanks|||If you just want to fix these values in the table then just issue an T-SQL UPDATE statement:
UPDATE MyTable
SET MyField = ISNULL(MyField, <some_value>)
or
UPDATE MyTable
SET MyField = <some_value>
WHERE MyField IS NULL
This can be issued from an SSIS Execute SQL Task if you so desire.

If you are moving this data to somewhere else using SSIS and you want to eliminate the missing values as the data is being moved then include a Derived Column Transform in your data-flow which can be used to replace a missing value using an expression.
The expression builder is fairly intuitive but if you have any trouble then reply here and people will be able to help out.

-Jamie|||
Thanks.

But if there is a way that SQL Server can automatically figure out a reasonable value used to fill in the missing value? I mean I do not need to specify a value to replace the missing value, but SQL Server will figure out one

Thanks|||

Yanbing Hu wrote:


Thanks.

But if there is a way that SQL Server can automatically figure out a reasonable value used to fill in the missing value? I mean I do not need to specify a value to replace the missing value, but SQL Server will figure out one

Thanks

Well surely that depends on your criteria for deciding what the missing value is. Can you give an example?

-Jamie|||You might be refering to the default value that can be specified per column in the CREATE TABLE statement itself.

Fix legacy data - Missing primary key + duplication record + large table

We have a large table which is very old and not much ppl take care about, recently there is a performance problem from the report need to query to this table. Eventally we find that this table have primary key missing and there is duplicate data which make "alter table add primary key" don't work

Besides the data size of this table require unacceptable time to execute something like "insert into new_table_with_pk from select distinct * from old table"

Do you have any recommendation of fixing this? As the application run on oracle , sybase and sql server, is that cross database approace will work?How big is ur table?.have u tried to create non clustered index on the field(s) of the tables which ur report using in filter condition.U have to do this modification when ur database have less load.|||How big is ur table?.have u tried to create non clustered index on the field(s) of the tables which ur report using in filter condition.U have to do this modification when ur database have less load.

It is about 2 millions rows. We haven't create non clustered index as we like to remove duplication and create primary key. So you mean first create index then do [insert into new_table from select distinct * from old_table]?|||first of all 2m records is not that big.distinct keyword is the killer here,it will affect the perfomance of ur query
Some options are,

change ur database option to 'true' for 'select into/bulkcopy' before u doing select * into.

exec sp_dboption 'urdatabase','select into/bulkcopy',true

this will improve the perfomance of the query 'select into' .

u should try checksum function in sql to remove duplicate.
before that add new column in exist table with identity,primary key

alter table urtable add [id] int identity(1,1)
CONSTRAINT id_pk PRIMARY KEY

-- select checksumvalues
eg:count duplicate in city,state,zip,contract in authors table.And delete duplicates

use pubs
go
delete authors from (
select max(au_id) as au_id,checksumvalue from
(
select au_id,au_lname,checksum(city,state,zip,contract) as checksumvalue from authors
) as t group by checksumvalue
having count(*)>1
) as t1 where authors.au_id=t1.au_id and authors.au_lname=t1.au_lname
--Note u should compare atleast one column from duplicate columns in where --clause(because checksum functiont is not 100% acuurate) as u can see , I --used 'au_lname' field in the above query

Same way u should compare with ur new [id] column which u created.



finally u have to build index on that table for better perfomance.

come back to me,if have doubts on how to remove duplicates using checksum function. try to put tables DDL also.


NB: dont forgot change back database option to,

exec sp_dboption 'urdatabase','select into/bulkcopy',false

after finish this job.

FiscalWeekOfQuarter missing

When I build a time dimension, FiscalWeekOfQuarter does not show up. On the following MSDN page it is listed as an attribute.

http://msdn2.microsoft.com/en-US/library/ms175662.aspx#time_dimension_attribute_types

Anyone know how I can add it? Thanks.

Can you describe the steps you took to build the dimension? I just ran through the dimension wizard, building a server-based time dimension and an attribute of type "FiscalWeekOfQuarter" was created by the wizard. I also looked at an existing time dimension I had based on a dimension table and I can select "FiscalWeekOfQuarter" as the Type for an existing dimension attribute...

Dave Fackler

FiscalWeekOfQuarter missing

When I build a time dimension, FiscalWeekOfQuarter does not show up. On the following MSDN page it is listed as an attribute.

http://msdn2.microsoft.com/en-US/library/ms175662.aspx#time_dimension_attribute_types

Anyone know how I can add it? Thanks.

Can you describe the steps you took to build the dimension? I just ran through the dimension wizard, building a server-based time dimension and an attribute of type "FiscalWeekOfQuarter" was created by the wizard. I also looked at an existing time dimension I had based on a dimension table and I can select "FiscalWeekOfQuarter" as the Type for an existing dimension attribute...

Dave Fackler