Showing posts with label file. Show all posts
Showing posts with label file. Show all posts

Friday, March 30, 2012

Load Ordering for Dimension and Fact tables

Hi ,

I have situation where I get data from SRC Flat file and have to load Dimensional table and also fact table, using same data flow(have no other choice since I have to unpivot some src data). Since I have to load both tables in same data flow, I have to have a way to put load ordering constraint (I know informatica allows that). Does any one have any idea on how this can be done in SSIS?

I would be really grateful.

Thanks

The SSIS package designer contains a Control Flow tab and a Data Flow Tab. On the Control Flow tab, you would create two Data Flow tasks linked by a precedence constraint. The first task would load the dimension data and the second would load the fact data only if the first task succeeds or completes depending on the precedence conditions you configure.

Was your question this elementary?

|||In my question I said, I can't use two data flows, I have to use only one data flow. So is there a way to this?

Thanks,|||

DW Developer wrote:

Hi ,

I have situation where I get data from SRC Flat file and have to load Dimensional table and also fact table, using same data flow(have no other choice since I have to unpivot some src data). Since I have to load both tables in same data flow, I have to have a way to put load ordering constraint (I know informatica allows that). Does any one have any idea on how this can be done in SSIS?

I would be really grateful.

Thanks

Very very good question. The feature you are referring to is sometimes called "Intrinsic Flow Priority". It doesn't exist in SSIS at the moment and I hope to god they put it into the next release. I have requested it here: https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=178058 and have noted that it exists in Informatica. I would appreicate it if you could click-through and add some comments. We're more likely to get it if more people ask for it and give real reasons why they need it.

In the meantime, you can achieve the same using raw files to pass data between different data-flows. This is explained here:

Splitting order detail and order header information from one file into multiple tables
(
http://blogs.conchango.com/jamiethomson/archive/2006/05/22/3974.aspx)

HTH

-Jamie

Load Multiple Signed Assemblies

I am trying to load multiple strongly named assemblies into the same database which are signed with the same .snk file (signed in Visual Studio). I use the following code to create an asymmetric key and login as Books Online recommends:

CREATE ASYMMETRIC KEY SQLCLRKey FROM FILE = 'D:\dba\bin\Assembly.dll'

CREATE LOGIN CLRAssembler FROM ASYMMETRIC KEY SQLCLRKey

GRANT UNSAFE ASSEMBLY TO CLRAssembler

GRANT EXTERNAL ACCESS ASSEMBLY TO CLRAssembler

REVOKE CONNECT SQL FROM CLRAssembler

Do I need to create a new login and asymmetric key for each assembly I load? If so, do I need to sign each with a different key because its giving me an error message when I try to create 2 separate asymmetric keys/logins from 2 different assemblies which have been signed with the same .snk file.

The only way I've gotten everything to load properly is to create a separate key for each assembly and sign each, then create separate logins and asymmetric keys in the database.

Is this the only way to do this? Or am I missing something?

First of all I think you mean:

CREATE ASYMMETRIC KEY SQLCLRKey FROM EXECUTABLE FILE = 'D:\dba\bin\Assembly.dll'

FROM FILE = '...' requires a file that has both the public and private key in it, but an assembly has only the public key in it. Also you should be creating this key in the master database.

In order to use an asymmetic key to enable an assembly to be loaded the asymmetric key must be the master database and include public key, but the private key is not required. When FROM EXECUTABLE FILE = '...' is used the only the public key for the asymmetric key is saved. This key can be used to create a login to grant usafe assembly to. Then, assuming the use has the other appropriate permissions, any assembly signed with this key can be loaded with permission_set = unsafe. A single login is used to load all of the assemblies that are signed with the same key... you can't load the same asymmetric key more than once in the same database. You will have to be sure that Visual Studio is signing all your assemblies with the same key. If you are having to create a new login for each assembly it sounds like Visual Studio is creating a new key for each of these assemblies. When you go to the properties for your visual studio project browse for a common key, don't create a new one.

You can create the asymmetric key directly from the snk file that visual studio creates, for example if myKey.snk is the key pair created by visual studio then:

USE master
GO

CREATE ASYMMETRIC KEY [MyAssemblyKey] FROM FILE = 'c:\keys\myKey.snk'
-- remove the private key, no reason to leave it hanging around.
ALTER ASYMMETRIC KEY [MyAssemblyKey] REMOVE PRIVATE KEY

CREATE LOGIN [LoginMyAssemblyKey] FROM ASYMMETRIC KEY [Key MyAssemblyKey]
GRANT EXTERNAL ACCESS ASSEMBLY TO [LoginMyAssemblyKey]

GO

Once you have done this any assemblies signed with myKey.snk can be deployed from visual studio with unsafe permission set.

Dan

Dan

|||

My mistake. I did mean EXECUTABLE FILE.

I started out trying to sign them all with the same key and then loading them individually and dropping the key and login, however this was producing an error (which I can post once I get back into the office).

Do I need to load them in the same batch or script if I want to use the same login? Because I was running them separately.

If not, how do I specify the login to use? I tried using the AUTHORIZATION command with it and it threw a permissions error.

|||

I'm not sure what you mean when you say you drop the login after creating the assembly.

If you drop the login, or take away the login's USAFE ASSEMBLY permission, you will not be able to use the assembly even though even though it has been created. The login created with the assemblies key is required whenever any function from the assembly is used.

Dan

|||

You need only use CREATE ASSEMBLY. Authorization is used to specify an owner, it is not related to whether or not the assembly can be external acess or unsafe. If the assembly is being created WITH EXTERNAL_ACCESS or UNSAFE, SQL Server will use the key inside of the assembly to find the login created with that key, then check the permissions granted to that login. It, in effect, does this whenever a function from that assembly is used too.

Dan

Load images into Sql Server 2005

Hi There

I have not had much luck finding info in BOL for tsql or SSIS that tells one how to load images on the file system into sql server 2005.

All i have really been able to find is that IMAGE data type will not be used in future and that one should use a varbinary(max) data type.

I am thinking of using a for each file loop in SSIS, but then how do i load the images (.tif) into a sql server database table ? Perhaps i need to use a sql task with the filepath , or an active x script.

Anyway if anyone knows how i can load images from the file system into sql server 2005, please let me know.

Thanx

Hi,

U can use Activex Script. But it is better to use Script task.

|||

You should look at the Import Column component. http://msdn2.microsoft.com/en-us/library/ms141262.aspx

All you need is a source file or table, with a column containing the filenames you wish to insert. SSIS will then load each named file into the data flow, from whence you can insert it to the database as normal.

Choice of the best data type for storing images would be better discussed on the SQL Server engine forum.

Donald

|||

Hi Donald

Would a for each file loop not work better, as a source file or table is not realistic considering there are over 9 million flat files.

I am not sure i am following you, import column requires a data source, if i point a flat file source to a image file it gets very confused with randon columns and junk data. I am not sure how to feed the flat file image to the import column task?

I have figured out another way to do it. But i am also interested in your suggestion.

Thanx

|||

That is indeed a lot of files. Actually it is so many that you may want to contact me offline to discuss options. DonaldDotFarmerAtMicrosoftDotCom will get me.

One way to generate a suitable file as a source, may be to pipe a dir command to file and then parse the result using SSIS - either using a flat file source, or a script component. From there it would be relatively simple to implement your scenario.

Donald

|||

Thanx Donald

I am gonna try a couple of things and i will get back to you.

|||

The TextCopy utility is a great way to load binary data into BLOB fields. I am calling the util from a .bat file. Its another option anyway....

Check out this article

http://www.mssqlcity.com/Articles/KnowHow/Textcopy.htm

|||

Dietz wrote:

Hi There

I have not had much luck finding info in BOL for tsql or SSIS that tells one how to load images on the file system into sql server 2005.

All i have really been able to find is that IMAGE data type will not be used in future and that one should use a varbinary(max) data type.

I am thinking of using a for each file loop in SSIS, but then how do i load the images (.tif) into a sql server database table ? Perhaps i need to use a sql task with the filepath , or an active x script.

Anyway if anyone knows how i can load images from the file system into sql server 2005, please let me know.

Thanx

the t-sql OPENROWSET BULK statement is designed to import files into sql server: http://msdn2.microsoft.com/en-us/library/ms190312.aspx

this statement can then be used in an execute sql task.

i suggest that you consult with the t-sql forum if you need assistance with this statement.

Load images into Sql Server 2005

Hi There

I have not had much luck finding info in BOL for tsql or SSIS that tells one how to load images on the file system into sql server 2005.

All i have really been able to find is that IMAGE data type will not be used in future and that one should use a varbinary(max) data type.

I am thinking of using a for each file loop in SSIS, but then how do i load the images (.tif) into a sql server database table ? Perhaps i need to use a sql task with the filepath , or an active x script.

Anyway if anyone knows how i can load images from the file system into sql server 2005, please let me know.

Thanx

Hi,

U can use Activex Script. But it is better to use Script task.

|||

You should look at the Import Column component. http://msdn2.microsoft.com/en-us/library/ms141262.aspx

All you need is a source file or table, with a column containing the filenames you wish to insert. SSIS will then load each named file into the data flow, from whence you can insert it to the database as normal.

Choice of the best data type for storing images would be better discussed on the SQL Server engine forum.

Donald

|||

Hi Donald

Would a for each file loop not work better, as a source file or table is not realistic considering there are over 9 million flat files.

I am not sure i am following you, import column requires a data source, if i point a flat file source to a image file it gets very confused with randon columns and junk data. I am not sure how to feed the flat file image to the import column task?

I have figured out another way to do it. But i am also interested in your suggestion.

Thanx

|||

That is indeed a lot of files. Actually it is so many that you may want to contact me offline to discuss options. DonaldDotFarmerAtMicrosoftDotCom will get me.

One way to generate a suitable file as a source, may be to pipe a dir command to file and then parse the result using SSIS - either using a flat file source, or a script component. From there it would be relatively simple to implement your scenario.

Donald

|||

Thanx Donald

I am gonna try a couple of things and i will get back to you.

|||

The TextCopy utility is a great way to load binary data into BLOB fields. I am calling the util from a .bat file. Its another option anyway....

Check out this article

http://www.mssqlcity.com/Articles/KnowHow/Textcopy.htm

|||

Dietz wrote:

Hi There

I have not had much luck finding info in BOL for tsql or SSIS that tells one how to load images on the file system into sql server 2005.

All i have really been able to find is that IMAGE data type will not be used in future and that one should use a varbinary(max) data type.

I am thinking of using a for each file loop in SSIS, but then how do i load the images (.tif) into a sql server database table ? Perhaps i need to use a sql task with the filepath , or an active x script.

Anyway if anyone knows how i can load images from the file system into sql server 2005, please let me know.

Thanx

the t-sql OPENROWSET BULK statement is designed to import files into sql server: http://msdn2.microsoft.com/en-us/library/ms190312.aspx

this statement can then be used in an execute sql task.

i suggest that you consult with the t-sql forum if you need assistance with this statement.

Load image file

HI

how to load a image file in to a sql server.

do we need c# code for it or can we use just a t-sql procedure to upload it.

In my application we don't have ant c# or other application. we have only t-sql

thanks

sandipan

If you are planning to use SSIS, the Import Column transform could be useful for this purpose.

Thanks.

load files

the connection string in my application daynamic ..changed by changing the development environmet ..how can i load a data from file to sql server destination without hard coded the connection

thx

hi,

You could use xml files, registry entries or sql tables in order to save these parameters. (Package configurations when you click on the right mouse button) and then load them on demand.

|||Many links regarding package configurations can be found here: http://www.google.com/search?hl=en&q=ssis+package+configurations|||

Begin here: http://msdn2.microsoft.com/en-us/library/ms137592.aspx

load files

the connection string in my application daynamic ..changed by changing the development environmet ..how can i load a data from file to sql server destination without hard coded the connection

thx

hi,

You could use xml files, registry entries or sql tables in order to save these parameters. (Package configurations when you click on the right mouse button) and then load them on demand.

|||Many links regarding package configurations can be found here: http://www.google.com/search?hl=en&q=ssis+package+configurations|||

Begin here: http://msdn2.microsoft.com/en-us/library/ms137592.aspx

Load File In A Table

HELLO EVERYBODY...
I NEED YOUR HELP... I HAVE TO LOAD A FILE IN A TABLE OF MY DATABASE AND LATER MANIPULATING THE FILE... HOW CAN I DO THIS?
I'M LOOKING FOR INFORMATION ABOUT RAW DATATYPE AND LOB BUT I COULDN'T DO IT...
PLEASE HELP ME... :(
THANKS...what kind of database do you have to load into?

with oracle you can use sql*loader
with sybase you can use bcp
with db2 you can import with allows fixed length acsii and delimited acii

bernd

Load file

I am using MSSQL 2000, I also using mysql.
I want to know does mssql 2k had a command or function like mysql that (
load data infile.........) this synax?
??X wrote:
> I am using MSSQL 2000, I also using mysql.
> I want to know does mssql 2k had a command or function like mysql
> that ( load data infile.........) this synax?
Look at the BCP utility in BOL. You can also script data out using the
Import Export Wizard.
David Gugick
Imceda Software
www.imceda.com
|||Or the BULK INSERT command...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Gugick" <davidg-nospam@.imceda.com> wrote in message
news:OyhifiasEHA.2720@.TK2MSFTNGP12.phx.gbl...
> ??X wrote:
> Look at the BCP utility in BOL. You can also script data out using the
> Import Export Wizard.
> --
> David Gugick
> Imceda Software
> www.imceda.com
>
sql

Load file

I am using MSSQL 2000, I also using mysql.
I want to know does mssql 2k had a command or function like mysql that (
load data infile.........) this synax???_ wrote:
> I am using MSSQL 2000, I also using mysql.
> I want to know does mssql 2k had a command or function like mysql
> that ( load data infile.........) this synax?
Look at the BCP utility in BOL. You can also script data out using the
Import Export Wizard.
David Gugick
Imceda Software
www.imceda.com|||Or the BULK INSERT command...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Gugick" <davidg-nospam@.imceda.com> wrote in message
news:OyhifiasEHA.2720@.TK2MSFTNGP12.phx.gbl...
> ??_ wrote:
> Look at the BCP utility in BOL. You can also script data out using the
> Import Export Wizard.
> --
> David Gugick
> Imceda Software
> www.imceda.com
>

Load file

I am using MSSQL 2000, I also using mysql.
I want to know does mssql 2k had a command or function like mysql that (
load data infile.........) this synax?¬ÓªÌ¤§­· wrote:
> I am using MSSQL 2000, I also using mysql.
> I want to know does mssql 2k had a command or function like mysql
> that ( load data infile.........) this synax?
Look at the BCP utility in BOL. You can also script data out using the
Import Export Wizard.
--
David Gugick
Imceda Software
www.imceda.com|||Or the BULK INSERT command...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Gugick" <davidg-nospam@.imceda.com> wrote in message
news:OyhifiasEHA.2720@.TK2MSFTNGP12.phx.gbl...
> ¬ÓªÌ¤§­· wrote:
>> I am using MSSQL 2000, I also using mysql.
>> I want to know does mssql 2k had a command or function like mysql
>> that ( load data infile.........) this synax?
> Look at the BCP utility in BOL. You can also script data out using the
> Import Export Wizard.
> --
> David Gugick
> Imceda Software
> www.imceda.com
>

Load Excel Data using DTS NULL error

Hi!
I am loading data from Excel file, with three columns Varchar(5), Float and
Char(6).
When I execute DTS I am getting few NULL values for first column
(Varchar(5)). There is a appropriate data in Excel file. I checked in DTS
Preview, it is also showing Null values for that.
Thanks,
Sam
Not sure what your question us here? Do you mean there arent really nulls
but sql thinks there is? Do you mean there are null values and sql wont
allow them?
"Sam" <Sam@.discussions.microsoft.com> wrote in message
news:FF87A229-33D7-460C-8F0E-162F7F0F6AEC@.microsoft.com...
> Hi!
> I am loading data from Excel file, with three columns Varchar(5), Float
> and
> Char(6).
> When I execute DTS I am getting few NULL values for first column
> (Varchar(5)). There is a appropriate data in Excel file. I checked in DTS
> Preview, it is also showing Null values for that.
> Thanks,
> Sam
|||Chris,
Thanks for the reply. This problem got fix temporarily, as the person who
gave me this excel file, he said there was some formula involved. Anyway the
problem I am describing below:
Example:
Column1 - Location list 1, 2, 3, ...10.
Column 2 - Location Name A, B, C,...D
I tried to load both columns and found in the preview that 3 and 7 are
giving NULL values.
Thanks,
Sam
"ChrisR" wrote:

> Not sure what your question us here? Do you mean there arent really nulls
> but sql thinks there is? Do you mean there are null values and sql wont
> allow them?
>
> "Sam" <Sam@.discussions.microsoft.com> wrote in message
> news:FF87A229-33D7-460C-8F0E-162F7F0F6AEC@.microsoft.com...
>
>
|||In your DTS Package, use an Active X Script to replace the NULL's.
"Sam" <Sam@.discussions.microsoft.com> wrote in message
news:022D6103-CB66-468A-8063-CEB75BB9FAEF@.microsoft.com...[vbcol=seagreen]
> Chris,
> Thanks for the reply. This problem got fix temporarily, as the person who
> gave me this excel file, he said there was some formula involved. Anyway
> the
> problem I am describing below:
> Example:
> Column1 - Location list 1, 2, 3, ...10.
> Column 2 - Location Name A, B, C,...D
> I tried to load both columns and found in the preview that 3 and 7 are
> giving NULL values.
> Thanks,
> Sam
>
> "ChrisR" wrote:
|||Chris,
I tried with SQL Task and it did work.
Thanks,
Sam
"ChrisR" wrote:

> In your DTS Package, use an Active X Script to replace the NULL's.
>
> "Sam" <Sam@.discussions.microsoft.com> wrote in message
> news:022D6103-CB66-468A-8063-CEB75BB9FAEF@.microsoft.com...
>
>

Load Excel Data using DTS NULL error

Hi!
I am loading data from Excel file, with three columns Varchar(5), Float and
Char(6).
When I execute DTS I am getting few NULL values for first column
(Varchar(5)). There is a appropriate data in Excel file. I checked in DTS
Preview, it is also showing Null values for that.
Thanks,
SamNot sure what your question us here? Do you mean there arent really nulls
but sql thinks there is? Do you mean there are null values and sql wont
allow them?
"Sam" <Sam@.discussions.microsoft.com> wrote in message
news:FF87A229-33D7-460C-8F0E-162F7F0F6AEC@.microsoft.com...
> Hi!
> I am loading data from Excel file, with three columns Varchar(5), Float
> and
> Char(6).
> When I execute DTS I am getting few NULL values for first column
> (Varchar(5)). There is a appropriate data in Excel file. I checked in DTS
> Preview, it is also showing Null values for that.
> Thanks,
> Sam|||Chris,
Thanks for the reply. This problem got fix temporarily, as the person who
gave me this excel file, he said there was some formula involved. Anyway the
problem I am describing below:
Example:
Column1 - Location list 1, 2, 3, ...10.
Column 2 - Location Name A, B, C,...D
I tried to load both columns and found in the preview that 3 and 7 are
giving NULL values.
Thanks,
Sam
"ChrisR" wrote:
> Not sure what your question us here? Do you mean there arent really nulls
> but sql thinks there is? Do you mean there are null values and sql wont
> allow them?
>
> "Sam" <Sam@.discussions.microsoft.com> wrote in message
> news:FF87A229-33D7-460C-8F0E-162F7F0F6AEC@.microsoft.com...
> > Hi!
> > I am loading data from Excel file, with three columns Varchar(5), Float
> > and
> > Char(6).
> > When I execute DTS I am getting few NULL values for first column
> > (Varchar(5)). There is a appropriate data in Excel file. I checked in DTS
> > Preview, it is also showing Null values for that.
> >
> > Thanks,
> > Sam
>
>|||In your DTS Package, use an Active X Script to replace the NULL's.
"Sam" <Sam@.discussions.microsoft.com> wrote in message
news:022D6103-CB66-468A-8063-CEB75BB9FAEF@.microsoft.com...
> Chris,
> Thanks for the reply. This problem got fix temporarily, as the person who
> gave me this excel file, he said there was some formula involved. Anyway
> the
> problem I am describing below:
> Example:
> Column1 - Location list 1, 2, 3, ...10.
> Column 2 - Location Name A, B, C,...D
> I tried to load both columns and found in the preview that 3 and 7 are
> giving NULL values.
> Thanks,
> Sam
>
> "ChrisR" wrote:
>> Not sure what your question us here? Do you mean there arent really nulls
>> but sql thinks there is? Do you mean there are null values and sql wont
>> allow them?
>>
>> "Sam" <Sam@.discussions.microsoft.com> wrote in message
>> news:FF87A229-33D7-460C-8F0E-162F7F0F6AEC@.microsoft.com...
>> > Hi!
>> > I am loading data from Excel file, with three columns Varchar(5), Float
>> > and
>> > Char(6).
>> > When I execute DTS I am getting few NULL values for first column
>> > (Varchar(5)). There is a appropriate data in Excel file. I checked in
>> > DTS
>> > Preview, it is also showing Null values for that.
>> >
>> > Thanks,
>> > Sam
>>|||Chris,
I tried with SQL Task and it did work.
Thanks,
Sam
"ChrisR" wrote:
> In your DTS Package, use an Active X Script to replace the NULL's.
>
> "Sam" <Sam@.discussions.microsoft.com> wrote in message
> news:022D6103-CB66-468A-8063-CEB75BB9FAEF@.microsoft.com...
> > Chris,
> > Thanks for the reply. This problem got fix temporarily, as the person who
> > gave me this excel file, he said there was some formula involved. Anyway
> > the
> > problem I am describing below:
> > Example:
> > Column1 - Location list 1, 2, 3, ...10.
> > Column 2 - Location Name A, B, C,...D
> > I tried to load both columns and found in the preview that 3 and 7 are
> > giving NULL values.
> >
> > Thanks,
> > Sam
> >
> >
> > "ChrisR" wrote:
> >
> >> Not sure what your question us here? Do you mean there arent really nulls
> >> but sql thinks there is? Do you mean there are null values and sql wont
> >> allow them?
> >>
> >>
> >> "Sam" <Sam@.discussions.microsoft.com> wrote in message
> >> news:FF87A229-33D7-460C-8F0E-162F7F0F6AEC@.microsoft.com...
> >> > Hi!
> >> > I am loading data from Excel file, with three columns Varchar(5), Float
> >> > and
> >> > Char(6).
> >> > When I execute DTS I am getting few NULL values for first column
> >> > (Varchar(5)). There is a appropriate data in Excel file. I checked in
> >> > DTS
> >> > Preview, it is also showing Null values for that.
> >> >
> >> > Thanks,
> >> > Sam
> >>
> >>
> >>
>
>

Load Excel Data using DTS NULL error

Hi!
I am loading data from Excel file, with three columns Varchar(5), Float and
Char(6).
When I execute DTS I am getting few NULL values for first column
(Varchar(5)). There is a appropriate data in Excel file. I checked in DTS
Preview, it is also showing Null values for that.
Thanks,
SamNot sure what your question us here? Do you mean there arent really nulls
but sql thinks there is? Do you mean there are null values and sql wont
allow them?
"Sam" <Sam@.discussions.microsoft.com> wrote in message
news:FF87A229-33D7-460C-8F0E-162F7F0F6AEC@.microsoft.com...
> Hi!
> I am loading data from Excel file, with three columns Varchar(5), Float
> and
> Char(6).
> When I execute DTS I am getting few NULL values for first column
> (Varchar(5)). There is a appropriate data in Excel file. I checked in DTS
> Preview, it is also showing Null values for that.
> Thanks,
> Sam|||Chris,
Thanks for the reply. This problem got fix temporarily, as the person who
gave me this excel file, he said there was some formula involved. Anyway the
problem I am describing below:
Example:
Column1 - Location list 1, 2, 3, ...10.
Column 2 - Location Name A, B, C,...D
I tried to load both columns and found in the preview that 3 and 7 are
giving NULL values.
Thanks,
Sam
"ChrisR" wrote:

> Not sure what your question us here? Do you mean there arent really nulls
> but sql thinks there is? Do you mean there are null values and sql wont
> allow them?
>
> "Sam" <Sam@.discussions.microsoft.com> wrote in message
> news:FF87A229-33D7-460C-8F0E-162F7F0F6AEC@.microsoft.com...
>
>|||In your DTS Package, use an Active X Script to replace the NULL's.
"Sam" <Sam@.discussions.microsoft.com> wrote in message
news:022D6103-CB66-468A-8063-CEB75BB9FAEF@.microsoft.com...[vbcol=seagreen]
> Chris,
> Thanks for the reply. This problem got fix temporarily, as the person who
> gave me this excel file, he said there was some formula involved. Anyway
> the
> problem I am describing below:
> Example:
> Column1 - Location list 1, 2, 3, ...10.
> Column 2 - Location Name A, B, C,...D
> I tried to load both columns and found in the preview that 3 and 7 are
> giving NULL values.
> Thanks,
> Sam
>
> "ChrisR" wrote:
>|||Chris,
I tried with SQL Task and it did work.
Thanks,
Sam
"ChrisR" wrote:

> In your DTS Package, use an Active X Script to replace the NULL's.
>
> "Sam" <Sam@.discussions.microsoft.com> wrote in message
> news:022D6103-CB66-468A-8063-CEB75BB9FAEF@.microsoft.com...
>
>sql

Load data from text file into some table implemented in stored procedure.

Hello, I want to load data from text file to MS SQL DB table.

In MySQL, it is the "LOAD DATA INFILE..." query statement.

What is sutable query if I want to migration from Mysql to MS SQL Server 2005 Express?

I think you need some third party tool, which will do the needed convertions. Executing query form a file you need to read the SQLCMD form BOL, this is command line utility.

|||hi remedios,

you can use the bcp(Bulk Copy Program) to basically do the same as in MySql. or if not why not use DTS in Enterprise Manager and select the text file as the Source

hth

Load Data from Flat File to Oracle with SQL Loader

Hi Friends
I need one help i need to load a data from Flat File to Oracle with the
help of SQl Loader so plz sumbuddy plz write me the example of that
script and how to load that data
thanks
sanTry an Oracle newsgroup or
http://asktom.oracle.com/pls/ask/f?p=4950:1:
Everything Oracle is there...
"san" wrote:

> Hi Friends
> I need one help i need to load a data from Flat File to Oracle with the
> help of SQl Loader so plz sumbuddy plz write me the example of that
> script and how to load that data
> thanks
> san
>

Load data from excel to sql server table

Hi,
I have data in a Excel spread sheet that has been saved as a csv file.
I need to load this data into a sql server table. What is the best way
to do this. Any ideas?
Thanks in advance.
use DTS Wizard
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164900614.237522.111940@.l39g2000cwd.googlegr oups.com...
> Hi,
> I have data in a Excel spread sheet that has been saved as a csv file.
> I need to load this data into a sql server table. What is the best way
> to do this. Any ideas?
> Thanks in advance.
>
|||Yes DTS or SSIS would be the best choice.
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164900614.237522.111940@.l39g2000cwd.googlegr oups.com...
> Hi,
> I have data in a Excel spread sheet that has been saved as a csv file.
> I need to load this data into a sql server table. What is the best way
> to do this. Any ideas?
> Thanks in advance.
>
|||Thanks a lot.. that does seem to work.. but I need a script or a
program to do that.. what is the sql command that could be used ? I'm
new to DB.. sorry if I'm asking a dumb question :-)
vt wrote:[vbcol=seagreen]
> use DTS Wizard
>
> vt
> "db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
> news:1164900614.237522.111940@.l39g2000cwd.googlegr oups.com...
|||check
OPENDATASOURCE function
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164903796.447484.26940@.f1g2000cwa.googlegrou ps.com...
> Thanks a lot.. that does seem to work.. but I need a script or a
> program to do that.. what is the sql command that could be used ? I'm
> new to DB.. sorry if I'm asking a dumb question :-)
> vt wrote:
>
|||or you can use
OPENROWSET function as well
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164903796.447484.26940@.f1g2000cwa.googlegrou ps.com...
> Thanks a lot.. that does seem to work.. but I need a script or a
> program to do that.. what is the sql command that could be used ? I'm
> new to DB.. sorry if I'm asking a dumb question :-)
> vt wrote:
>
sql

Load data from excel to sql server table

Hi,
I have data in a Excel spread sheet that has been saved as a csv file.
I need to load this data into a sql server table. What is the best way
to do this. Any ideas?
Thanks in advance.use DTS Wizard
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
> Hi,
> I have data in a Excel spread sheet that has been saved as a csv file.
> I need to load this data into a sql server table. What is the best way
> to do this. Any ideas?
> Thanks in advance.
>|||Yes DTS or SSIS would be the best choice.
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
> Hi,
> I have data in a Excel spread sheet that has been saved as a csv file.
> I need to load this data into a sql server table. What is the best way
> to do this. Any ideas?
> Thanks in advance.
>|||Thanks a lot.. that does seem to work.. but I need a script or a
program to do that.. what is the sql command that could be used ? I'm
new to DB.. sorry if I'm asking a dumb question :-)
vt wrote:[vbcol=seagreen]
> use DTS Wizard
>
> vt
> "db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
> news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...|||check
OPENDATASOURCE function
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164903796.447484.26940@.f1g2000cwa.googlegroups.com...
> Thanks a lot.. that does seem to work.. but I need a script or a
> program to do that.. what is the sql command that could be used ? I'm
> new to DB.. sorry if I'm asking a dumb question :-)
> vt wrote:
>|||or you can use
OPENROWSET function as well
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164903796.447484.26940@.f1g2000cwa.googlegroups.com...
> Thanks a lot.. that does seem to work.. but I need a script or a
> program to do that.. what is the sql command that could be used ? I'm
> new to DB.. sorry if I'm asking a dumb question :-)
> vt wrote:
>

Load data from excel to sql server table

Hi,
I have data in a Excel spread sheet that has been saved as a csv file.
I need to load this data into a sql server table. What is the best way
to do this. Any ideas?
Thanks in advance.use DTS Wizard
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
> Hi,
> I have data in a Excel spread sheet that has been saved as a csv file.
> I need to load this data into a sql server table. What is the best way
> to do this. Any ideas?
> Thanks in advance.
>|||Thanks a lot.. that does seem to work.. but I need a script or a
program to do that.. what is the sql command that could be used ? I'm
new to DB.. sorry if I'm asking a dumb question :-)
vt wrote:
> use DTS Wizard
>
> vt
> "db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
> news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
> > Hi,
> >
> > I have data in a Excel spread sheet that has been saved as a csv file.
> > I need to load this data into a sql server table. What is the best way
> > to do this. Any ideas?
> >
> > Thanks in advance.
> >|||Yes DTS or SSIS would be the best choice.
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
> Hi,
> I have data in a Excel spread sheet that has been saved as a csv file.
> I need to load this data into a sql server table. What is the best way
> to do this. Any ideas?
> Thanks in advance.
>|||check
OPENDATASOURCE function
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164903796.447484.26940@.f1g2000cwa.googlegroups.com...
> Thanks a lot.. that does seem to work.. but I need a script or a
> program to do that.. what is the sql command that could be used ? I'm
> new to DB.. sorry if I'm asking a dumb question :-)
> vt wrote:
>> use DTS Wizard
>>
>> vt
>> "db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
>> news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
>> > Hi,
>> >
>> > I have data in a Excel spread sheet that has been saved as a csv file.
>> > I need to load this data into a sql server table. What is the best way
>> > to do this. Any ideas?
>> >
>> > Thanks in advance.
>> >
>|||or you can use
OPENROWSET function as well
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164903796.447484.26940@.f1g2000cwa.googlegroups.com...
> Thanks a lot.. that does seem to work.. but I need a script or a
> program to do that.. what is the sql command that could be used ? I'm
> new to DB.. sorry if I'm asking a dumb question :-)
> vt wrote:
>> use DTS Wizard
>>
>> vt
>> "db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
>> news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
>> > Hi,
>> >
>> > I have data in a Excel spread sheet that has been saved as a csv file.
>> > I need to load this data into a sql server table. What is the best way
>> > to do this. Any ideas?
>> >
>> > Thanks in advance.
>> >
>

Load data from comma delimited text file

Hello, i need to load some data from a long comma delimited text file, How can a i do that, using t-sql?, thanks for your help!!!!!what do you mean "long"? is there a row delimiter in the file?|||the file has 25.000 ++ rows, and yes, is comma delimited!|||click the start button on your desktop and then click run
in the run dialog box type dtswiz

when the import export wizard opens up perform the following tasks..

set the source as your text file

set the destination as your table

set any transformations

save this as you need to ( i always save to a com storage file)

schedule if you need to

click finish...|||Bulk Insert yourtable
From 'c:\yourtextfile.txt'
With (FieldTerminator = ',',
RowTerminator = ',\n',
CodePage = 'ACP',
TabLock);|||The bulk insert is that i was looking for. Thanks for your help!!!