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 on SQL Server Database

Hi,
How do we find the load on the SQL server database. even i am not
asking in the right mannar but i will can explain my problem then u
suggest me the right way to clear my problem.
i have written my code in C++,i am using multi threading and my
database is SQL Server.
i closed the connections perfectly still, i am seeing the connection
leak on Performance Viewer.
So i disabled some of the SQL Statements so very very very very slowly
, the connection leaks are growing. like propostional to disabling the
SQL Statements growing of connection leak.
so i thought it will be load balancing factor of the SQL Server or my
thing will be worng please any body help me.
In short, I want to know if the load on the SQL Server can cause
connection leaks? and if yes, then how can we define load on the SQL
Server database.
Thanks in advance,
RSTake a look at Perfomnace Monitor
http://www.sql-server-performance.com/performance_monitor_counters_memory.asp
<sk.rasheedfarhan@.gmail.com> wrote in message
news:1167284187.612926.263370@.73g2000cwn.googlegroups.com...
> Hi,
> How do we find the load on the SQL server database. even i am not
> asking in the right mannar but i will can explain my problem then u
> suggest me the right way to clear my problem.
> i have written my code in C++,i am using multi threading and my
> database is SQL Server.
> i closed the connections perfectly still, i am seeing the connection
> leak on Performance Viewer.
> So i disabled some of the SQL Statements so very very very very slowly
> , the connection leaks are growing. like propostional to disabling the
> SQL Statements growing of connection leak.
> so i thought it will be load balancing factor of the SQL Server or my
> thing will be worng please any body help me.
> In short, I want to know if the load on the SQL Server can cause
> connection leaks? and if yes, then how can we define load on the SQL
> Server database.
> Thanks in advance,
> RS
>sql

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 from sqlserver to its instance

I need to load data from a table in sqlserver to a table
in an instance of the same server. The query need to be
run in the SQL server itself not in the instance. So...
insert into [servername\instancename].[dbname].
[dbo].table1 (
col1,
col2)
select
t2.col1,
t2.col2
from table2 as t2
I keep getting this message:
Server 'CNS-SFO-A46\QA' is not configured for DATA ACCESS.
Thanks in advance for you help.This is a multi-part message in MIME format.
--=_NextPart_000_038B_01C3D5F9.27781520
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
In Enterprise Mgr, right click on the linked server - CNS-SFO-A46\QA. Bring
up the properties, click on Server Options, then check the Data Access box.
--
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Sandra" <anonymous@.discussions.microsoft.com> wrote in message
news:00db01c3d620$c2708f40$a601280a@.phx.gbl...
I need to load data from a table in sqlserver to a table
in an instance of the same server. The query need to be
run in the SQL server itself not in the instance. So...
insert into [servername\instancename].[dbname].
[dbo].table1 (
col1,
col2)
select
t2.col1,
t2.col2
from table2 as t2
I keep getting this message:
Server 'CNS-SFO-A46\QA' is not configured for DATA ACCESS.
Thanks in advance for you help.
--=_NextPart_000_038B_01C3D5F9.27781520
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

In Enterprise Mgr, right click on the =linked server - CNS-SFO-A46\QA. Bring up the properties, =click on Server Options, then check the Data Access box.
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"Sandra" wrote in message news:00db01c3d620$c2=708f40$a601280a@.phx.gbl...I need to load data from a table in sqlserver to a table in an =instance of the same server. The query need to be run in the SQL server itself not =in the instance. So...insert into [servername\instancename].[dbname].[dbo].table1 (col1,col2)selectt2.col1,t2.col2from table2 as =t2 I keep getting this message:Server 'CNS-SFO-A46\QA' is =not configured for DATA ACCESS.Thanks in advance for you =help.

--=_NextPart_000_038B_01C3D5F9.27781520--|||I'm affraid I don't see a check box for Data Access. Is it
possible I'm looking in the wrong place?
>--Original Message--
>In Enterprise Mgr, right click on the linked server - CNS-
SFO-A46\QA. Bring
>up the properties, click on Server Options, then check
the Data Access box.
>--
>Tom
>----
--
>Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>SQL Server MVP
>Columnist, SQL Server Professional
>Toronto, ON Canada
>www.pinnaclepublishing.com/sql
>
>"Sandra" <anonymous@.discussions.microsoft.com> wrote in
message
>news:00db01c3d620$c2708f40$a601280a@.phx.gbl...
>I need to load data from a table in sqlserver to a table
>in an instance of the same server. The query need to be
>run in the SQL server itself not in the instance. So...
>insert into [servername\instancename].[dbname].
>[dbo].table1 (
>col1,
>col2)
>select
>t2.col1,
>t2.col2
>from table2 as t2
>I keep getting this message:
>Server 'CNS-SFO-A46\QA' is not configured for DATA ACCESS.
>Thanks in advance for you help.
>|||This is a multi-part message in MIME format.
--=_NextPart_000_0038_01C3D60C.8C53A730
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Did you find the linked server under Security->Linked Servers?
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
.
"Sandra" <anonymous@.discussions.microsoft.com> wrote in message
news:058101c3d631$7e232580$a101280a@.phx.gbl...
I'm affraid I don't see a check box for Data Access. Is it
possible I'm looking in the wrong place?
>--Original Message--
>In Enterprise Mgr, right click on the linked server - CNS-
SFO-A46\QA. Bring
>up the properties, click on Server Options, then check
the Data Access box.
>--
>Tom
>----
--
>Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>SQL Server MVP
>Columnist, SQL Server Professional
>Toronto, ON Canada
>www.pinnaclepublishing.com/sql
>
>"Sandra" <anonymous@.discussions.microsoft.com> wrote in
message
>news:00db01c3d620$c2708f40$a601280a@.phx.gbl...
>I need to load data from a table in sqlserver to a table
>in an instance of the same server. The query need to be
>run in the SQL server itself not in the instance. So...
>insert into [servername\instancename].[dbname].
>[dbo].table1 (
>col1,
>col2)
>select
>t2.col1,
>t2.col2
>from table2 as t2
>I keep getting this message:
>Server 'CNS-SFO-A46\QA' is not configured for DATA ACCESS.
>Thanks in advance for you help.
>
--=_NextPart_000_0038_01C3D60C.8C53A730
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Did you find the linked server under Security->Linked Servers?
-- Tom
----Thomas A. =Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql.
"Sandra" wrote in message news:058101c3d631$7e=232580$a101280a@.phx.gbl...I'm affraid I don't see a check box for Data Access. Is it possible I'm =looking in the wrong place?>--Original Message-->In =Enterprise Mgr, right click on the linked server - CNS-SFO-A46\QA. Bring>up the properties, click on Server Options, then check =the Data Access box.>>-->Tom>>--=---->Thomas A. Moreau, BSc, PhD, MCSE, MCDBA>SQL Server MVP>Columnist, =SQL Server Professional>Toronto, ON Canada>www.pinnaclepublishing.com/sql>>>"Sand=ra" wrote in message>news:00db01c3d620$c2708f40$a601280a@.phx.gbl...>=I need to load data from a table in sqlserver to a table>in an instance =of the same server. The query need to be>run in the SQL server itself =not in the instance. So...>>insert into [servername\instancename].[dbname].>[dbo].table1 (>col1,>col2)>select>t2.col1,>t2.col2>from table2 as t2>>I keep getting this =message:>>Server 'CNS-SFO-A46\QA' is not configured for DATA =ACCESS.>>Thanks in advance for you help.>

--=_NextPart_000_0038_01C3D60C.8C53A730--|||Yes, I did and I don't find the name of the server listed
but when I try to create New Linked Server it says the
server already exist. The same response I get when I try
to run EXEC sp_addlinkedserver
@.server = 'servername\instancename'
Also, I see the name of the server in the sysservers table.
>--Original Message--
>Did you find the linked server under Security->Linked
Servers?
>--
> Tom
>----
>Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>SQL Server MVP
>Columnist, SQL Server Professional
>Toronto, ON Canada
>www.pinnaclepublishing.com/sql
>..
>"Sandra" <anonymous@.discussions.microsoft.com> wrote in
message
>news:058101c3d631$7e232580$a101280a@.phx.gbl...
>I'm affraid I don't see a check box for Data Access. Is it
>possible I'm looking in the wrong place?
>>--Original Message--
>>In Enterprise Mgr, right click on the linked server -
CNS-
>SFO-A46\QA. Bring
>>up the properties, click on Server Options, then check
>the Data Access box.
>>--
>>Tom
>>----
-
>--
>>Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>>SQL Server MVP
>>Columnist, SQL Server Professional
>>Toronto, ON Canada
>>www.pinnaclepublishing.com/sql
>>
>>"Sandra" <anonymous@.discussions.microsoft.com> wrote in
>message
>>news:00db01c3d620$c2708f40$a601280a@.phx.gbl...
>>I need to load data from a table in sqlserver to a table
>>in an instance of the same server. The query need to be
>>run in the SQL server itself not in the instance. So...
>>insert into [servername\instancename].[dbname].
>>[dbo].table1 (
>>col1,
>>col2)
>>select
>>t2.col1,
>>t2.col2
>>from table2 as t2
>>I keep getting this message:
>>Server 'CNS-SFO-A46\QA' is not configured for DATA
ACCESS.
>>Thanks in advance for you help.
>|||The server might already be listed under "remote servers". This would happen
for example if you were doing replication from one instance to another. You
can allow data access by running the procedure
sp_serveroption 'server' ,
'data access',
'true'
Hope this helps,
Joe Lax
<anonymous@.discussions.microsoft.com> wrote in message
news:06be01c3d641$bbad9740$a101280a@.phx.gbl...
> Yes, I did and I don't find the name of the server listed
> but when I try to create New Linked Server it says the
> server already exist. The same response I get when I try
> to run EXEC sp_addlinkedserver
> @.server = 'servername\instancename'
> Also, I see the name of the server in the sysservers table.
>
>
> >--Original Message--
> >Did you find the linked server under Security->Linked
> Servers?
> >
> >--
> > Tom
> >
> >----
> >Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> >SQL Server MVP
> >Columnist, SQL Server Professional
> >Toronto, ON Canada
> >www.pinnaclepublishing.com/sql
> >..
> >"Sandra" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:058101c3d631$7e232580$a101280a@.phx.gbl...
> >I'm affraid I don't see a check box for Data Access. Is it
> >possible I'm looking in the wrong place?
> >
> >>--Original Message--
> >>In Enterprise Mgr, right click on the linked server -
> CNS-
> >SFO-A46\QA. Bring
> >>up the properties, click on Server Options, then check
> >the Data Access box.
> >>
> >>--
> >>Tom
> >>
> >>----
> -
> >--
> >>Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> >>SQL Server MVP
> >>Columnist, SQL Server Professional
> >>Toronto, ON Canada
> >>www.pinnaclepublishing.com/sql
> >>
> >>
> >>"Sandra" <anonymous@.discussions.microsoft.com> wrote in
> >message
> >>news:00db01c3d620$c2708f40$a601280a@.phx.gbl...
> >>I need to load data from a table in sqlserver to a table
> >>in an instance of the same server. The query need to be
> >>run in the SQL server itself not in the instance. So...
> >>
> >>insert into [servername\instancename].[dbname].
> >>[dbo].table1 (
> >>col1,
> >>col2)
> >>select
> >>t2.col1,
> >>t2.col2
> >>from table2 as t2
> >>
> >>I keep getting this message:
> >>
> >>Server 'CNS-SFO-A46\QA' is not configured for DATA
> ACCESS.
> >>
> >>Thanks in advance for you help.
> >>
> >sql

Load from several CSV files

I have to load around 68 CSV files into one table. I have named the files
1.csv thru 68.csv. Is there a way I can don't have to make 68 packages to
load these. I am not very proficient with VBScriptTry using a global variable for the file name, a Dynamic Properties Task and
an ActiveX Script Task to programmatically loop through and change the name
of the input file for each import.
HTH
Jerry
"XXX" <sa@.nomail.com> wrote in message
news:uzU8pR7vFHA.1168@.TK2MSFTNGP10.phx.gbl...
>I have to load around 68 CSV files into one table. I have named the files
>1.csv thru 68.csv. Is there a way I can don't have to make 68 packages to
>load these. I am not very proficient with VBScript
>|||You can concatenate the files and create a big one to be imported.
This is the help for dos command "copy".
*****
C:\>copy /?
Copies one or more files to another location.
COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B]
[+ source [/A | /B] [+ ...]] [destination [/A | /B]]
source Specifies the file or files to be copied.
/A Indicates an ASCII text file.
/B Indicates a binary file.
/D Allow the destination file to be created decrypted
destination Specifies the directory and/or filename for the new file(s).
/V Verifies that new files are written correctly.
/N Uses short filename, if available, when copying a file with a
non-8dot3 name.
/Y Suppresses prompting to confirm you want to overwrite an
existing destination file.
/-Y Causes prompting to confirm you want to overwrite an
existing destination file.
/Z Copies networked files in restartable mode.
The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line. Default is
to prompt on overwrites unless COPY command is being executed from
within a batch script.
To append files, specify a single file for destination, but multiple files
for source (using wildcards or file1+file2+file3 format).
*****
AMB
"XXX" wrote:

> I have to load around 68 CSV files into one table. I have named the files
> 1.csv thru 68.csv. Is there a way I can don't have to make 68 packages to
> load these. I am not very proficient with VBScript
>
>

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 entire catelog into memory and keep it there?

I want to do Full text search exclusively using SQL 2005. Is there a way to
focus the SQL server to load the catelog into the system memory and stay
there? Since I want to make the search fastest as possible, everything else
can be slow. Thanks
--Xin Chen
No, there is no way of doing this. In the past I have looked at storing my
catalogs on a RAM disk and you do get better performance, however some of
Microsoft's customers have had spectacular failures while doing this.
The catalog is cached in the file system cache which surprisingly does work
optimally. The file system cache will be cached in RAM, which will be
flushed to disk when memory pressures get significant.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Xin Chen" <xchen@.xtremework.com> wrote in message
news:eGEYRBKJFHA.3196@.TK2MSFTNGP15.phx.gbl...
> I want to do Full text search exclusively using SQL 2005. Is there a way
to
> focus the SQL server to load the catelog into the system memory and stay
> there? Since I want to make the search fastest as possible, everything
else
> can be slow. Thanks
> --Xin Chen
>

Load dts2000 fails

Sometime ago i had to edit a dts package in ssis. To do that i've instaled the sql2005 dts. It worked fine at the time. But now i'm trying to open a dts in ssis after installing sp2 and it doesn't work. Every time i try to open a dts package i got the following error.


Error HRESULT E_FAIL has been returned from a call to a COM component. (Microsoft Visual Studio)


Program Location:

at DTS.CDTSLegacyDesignerClass.ShowDesigner()
at Microsoft.SqlServer.Dts.Tasks.Exec80PackageTask.GeneralView.btnEdit_Click(Object sender, EventArgs args)

I dont understand why this is happening. Just one thing i use to have windows server 2003 now i've xp sp2. I don′t know if this can be important but.

Thanks in advance.

I believe you can't open/edit DTS files in SSIS. You can execute DTS files from SSIS though.|||Of course you can edit them. But it's not even opening the packages, that's the problem. When you put the execute 2000 dts package task you can click the edit buton to see the dts. But i got the error i've wirted above.|||It's hard to tell for sure from the error, but it's possible that the DTS 2000 designer installation is corrupt. Have you tried installing the DTS Designer Components from the SQL 2005 Feature Pack download site?|||

Not sure, but try removing the curent feature pack and installing the Feb 2007 feature pack, as that may have been updated for SP2 - http://www.microsoft.com/downloads/details.aspx?familyid=50b97994-8453-4998-8226-fa42ec403d17&displaylang=en

I didn't think it changed but at any rate the re-install may help.

|||yeah i've installed the latest version of the pack but it still doesn't work. I really would like to know if there is somebody using winXPsp2 and have this component working. Because i use to have the 2003server and it was with the sp2 of sql2005 and it was working fine. So i really would like to know if it is the OS.

thanks|||

We do have an issue related to the use of teh DTS Designer with different versions of the common control dll found on different OS's. Since we've ruled out a corrupt install of the designer components, then I think it's worthwhile to spend the time to diagnose for the problem I mentioned. See this KB:

http://support.microsoft.com/default.aspx/kb/917406/en-us

|||That was a good idea but it didn't worked. I'm going to try some new approaches. I will keep everybody up to date. I only hope that this just work like it did before.

Thanks

Load Data using ADO.NET in SSIS

Hi,

How to extract and Load Data using ADO.NET in SSIS.i hope to extract data we have DataReader source .but how to load (Insert) data with ADO.NET ?.and is ADO.Net quicker than OLEDB ?

Thanks

Jegan.T

Where are you loading it to? SqlServer and OleDB Destinations will be the easiest, and most performant since they will do a bulk insert.|||

Sean,

Thanks for the Informations.But still as a part of our analysis .we need to load in to Oracle Database. can i know how to load data using ado.net .

Thanks

Jegan.T

|||

Jegan,

you can use .NET, Ole DB or ODBC providers to load data in to Oracle Databases, and these are all possible via ADO.NET.

Both Microsoft and Oracle, as well as other 3rd party vendors have Ole DB, .NET and ODBC connectors for Oracle databases. It all depends on your requirements on what version of Oracle and what features you'd like in your connection.

We recommend our customers to use Oracle's OleDB provider, and ODBC providers could be a bit slower, because SSIS uses the .NET-ODBC bridge, not native ODBC connections for data source components.

Another option could be using the native ODBC provider inside the ExecSQL Task, load the recordset, and use it in the data flow task, which could be cumbersome to do.

I think your best bet would be to use Oracle's OleDB provider.

|||Deniz Thanks.

Load Data to SQL SERVER

Which way will be easy to load XML data to SQL Server 2000
1. OPENXML
2. BULK LOAD
3. UpdateGRAM.
Thanks
This depends a lot on how much data you have to load and how complex the
schema you're loading it into is. Updategrams are not really suited to
loading large quantities of XML. Bulk Load is good for loading a lot of
data and doesn't require a lot of coding but it does require a mapping
schema to map the XML schema to the database schema. OpenXML is pretty easy
to code and doesn't require a mapping schema but it has a tendency to run
out of memory if you try to load very large documents.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"MK" <anonymous@.discussions.microsoft.com> wrote in message
news:20c8d01c45a00$53af6540$a301280a@.phx.gbl...
> Which way will be easy to load XML data to SQL Server 2000
> 1. OPENXML
> 2. BULK LOAD
> 3. UpdateGRAM.
> Thanks

Load data in SQL Using SQLXML 3.0

Rather new to xml...
I have played around with the samples for importing XML in SQL server using
SQLXML 3.0
It looks fairly easy when the xml is single level, however, is there a way
to load the following into a table ?
Assume you have invoices from customers in a format as follows...
<Invoices>
<InvoiceID>
<CustomerID></CustomerID>
<InvoiceItems>
<InvoiceLine>
<ItemDescription></ItemDescription>
</InvoiceLine>
</InvoiceItems>
</InvoiceID>
</Invoices>
And you want it placed in a table containing the following columns...
Invoice
CustomerID
InvoiceLine
ItemDescription
...where Invoice and Customer would be repeated for each line. I
understand it is not relational, but I am willing to accept that for now.
Thanks !
"Rob C" <rwc1960@.bellsouth.net> wrote in message
news:rgi4d.91720$Np2.30403@.bignews4.bellsouth.net. ..
[snip]
> It looks fairly easy when the xml is single level, however, is there a way
> to load the following into a table ?
The problem is bulk load treats each new element as a new table or row, so
you can't really load that xml directly. However, it is pretty easy to
flatten it. See this FAQ:
http://sqlxml.org/faqs.aspx?faq=24
Bryant
|||Thanks Bryant,
The example that interested me in the SQLXML documentation was done using
VbScript... It dealt with an xsd and xml file. The filetype referenced in
the article below is xsl. How do you "run the XML through the xsl" as the
article states. How do you then reference it in the BulkLoad object model
?
I saw for converting
"Bryant Likes" <bryant@.suespammers.org> wrote in message
news:eyULQpNoEHA.3900@.TK2MSFTNGP10.phx.gbl...
> "Rob C" <rwc1960@.bellsouth.net> wrote in message
> news:rgi4d.91720$Np2.30403@.bignews4.bellsouth.net. ..
> [snip]
> The problem is bulk load treats each new element as a new table or row, so
> you can't really load that xml directly. However, it is pretty easy to
> flatten it. See this FAQ:
> http://sqlxml.org/faqs.aspx?faq=24
> --
> Bryant
>
|||"Rob C" <rwc1960@.bellsouth.net> wrote in message
news:qes4d.92040$Np2.1532@.bignews4.bellsouth.net.. .
> Thanks Bryant,
> The example that interested me in the SQLXML documentation was done using
> VbScript... It dealt with an xsd and xml file. The filetype referenced
> in the article below is xsl. How do you "run the XML through the xsl" as
> the article states. How do you then reference it in the BulkLoad object
> model
What are you using to do the bulk loading? VBScript?
Bryant
|||Yes, I want to create a DTS package, consisting primarily of VbScript, then
run the package as a scheduled job... it will utilize the "SQLXMLBulkLoad"
object model. Since my data has multiple nodes I believe I must first
"flatten" it out. In other words, from the sample I reviewed in the SQLXML
documentation, it appears that the .Execute method is expecting 2
arguments... "TheXsd.xml" and "TheDataItself.xml". I guess I need to know
how to "flatten" the data. The article that you referenced previously
states that you "run it through the xsl". That is the process I am not
understanding (I'm rather new to xml itself). Alternatively, is there a way
to flatten the data using only an xsd ?
Thanks,
Rob
"Bryant Likes" <bryant@.suespammers.org> wrote in message
news:OMS3gXSoEHA.2764@.TK2MSFTNGP11.phx.gbl...
> "Rob C" <rwc1960@.bellsouth.net> wrote in message
> news:qes4d.92040$Np2.1532@.bignews4.bellsouth.net.. .
> What are you using to do the bulk loading? VBScript?
> --
> Bryant
>
|||"Rob C" <rwc1960@.bellsouth.net> wrote in message
news:Rdx4d.93238$Np2.13928@.bignews4.bellsouth.net. ..
[snip]
> I guess I need to know how to "flatten" the data. The article that you
> referenced previously states that you "run it through the xsl". That is
> the process I am not understanding (I'm rather new to xml itself).
You can use MSXML to do this. Here is an example:
http://msdn.microsoft.com/library/en...asp?frame=true

> Alternatively, is there a way to flatten the data using only an xsd ?
No...
Bryant
|||Thanks for the guidance, but I am still doing something wrong...
I've modified the Code to VBScript and get I get the following error
message...
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then
click the Refresh button, or try again later.

Switch from current encoding to specified encoding not supported. Error
processing resource 'file:///C:/SQLXML/Test.xml'. ...
<?xml version="1.0" encoding="UTF-16"?><ead><eadheader id=""
titleproper="Test" /></ead>
--...Here's the code I am using...
dim xslt
dim xslDoc
dim xslProc
dim xmlDoc
dim myErr
set xslt = CreateObject("Msxml2.XSLTemplate.3.0")
set xslDoc = CreateObject("Msxml2.FreeThreadedDOMDocument.3.0")
xslDoc.async = false
xslDoc.load "C:\SQLXML\EadXsl.xml"
xslt.stylesheet = xslDoc
set xmlDoc = CreateObject("Msxml2.DOMDocument.3.0")
xmlDoc.async = false
xmlDoc.load("C:\SQLXML\EadXml.xml")
set xslProc = xslt.createProcessor()
xslProc.input = xmlDoc
xslProc.transform()
dim filesys, testfile
set filesys = CreateObject("Scripting.FileSystemObject")
set testfile = filesys.CreateTextFile("C:\SQLXML\Test.xml",True)
testfile.Write xslProc.output
testfile.close
"Bryant Likes" <bryant@.suespammers.org> wrote in message
news:OHEApnnoEHA.2912@.TK2MSFTNGP10.phx.gbl...
> "Rob C" <rwc1960@.bellsouth.net> wrote in message
> news:Rdx4d.93238$Np2.13928@.bignews4.bellsouth.net. ..
> [snip]
> You can use MSXML to do this. Here is an example:
> http://msdn.microsoft.com/library/en...asp?frame=true
>
> No...
> --
> Bryant
>
|||Please disregard,,, I figured it out...
1. There is a small syntax error in the example posted at
http://sqlxml.org/faqs.aspx?faq=24
The xsl should read <xsl:value-of select="eadid"/> NOT
<xsl:value-of select="eaid"/> (missing "d" in "eaid")
2. There is a later version of the template and model I should be using in
tee VB Script (5 as opposed to 3)
Thanks,
Rob
"Rob C" <rwc1960@.bellsouth.net> wrote in message
news:6Kf5d.104016$Np2.19198@.bignews4.bellsouth.net ...
> Thanks for the guidance, but I am still doing something wrong...
> I've modified the Code to VBScript and get I get the following error
> message...
> The XML page cannot be displayed
> Cannot view XML input using style sheet. Please correct the error and then
> click the Refresh button, or try again later.
>
> ----
> Switch from current encoding to specified encoding not supported. Error
> processing resource 'file:///C:/SQLXML/Test.xml'. ...
> <?xml version="1.0" encoding="UTF-16"?><ead><eadheader id=""
> titleproper="Test" /></ead>
> --...Here's the code I am using...
> dim xslt
> dim xslDoc
> dim xslProc
> dim xmlDoc
> dim myErr
> set xslt = CreateObject("Msxml2.XSLTemplate.3.0")
> set xslDoc = CreateObject("Msxml2.FreeThreadedDOMDocument.3.0")
> xslDoc.async = false
> xslDoc.load "C:\SQLXML\EadXsl.xml"
> xslt.stylesheet = xslDoc
> set xmlDoc = CreateObject("Msxml2.DOMDocument.3.0")
> xmlDoc.async = false
> xmlDoc.load("C:\SQLXML\EadXml.xml")
> set xslProc = xslt.createProcessor()
> xslProc.input = xmlDoc
> xslProc.transform()
> dim filesys, testfile
> set filesys = CreateObject("Scripting.FileSystemObject")
> set testfile = filesys.CreateTextFile("C:\SQLXML\Test.xml",True)
> testfile.Write xslProc.output
> testfile.close
>
> "Bryant Likes" <bryant@.suespammers.org> wrote in message
> news:OHEApnnoEHA.2912@.TK2MSFTNGP10.phx.gbl...
>
|||"Rob C" <rwc1960@.bellsouth.net> wrote in message
news:Gox5d.109249$Np2.11641@.bignews4.bellsouth.net ...
> Please disregard,,, I figured it out...
> 1. There is a small syntax error in the example posted at
> http://sqlxml.org/faqs.aspx?faq=24
> The xsl should read <xsl:value-of select="eadid"/> NOT <xsl:value-of
> select="eaid"/> (missing "d" in "eaid")
I'll have to fix that... Thanks!
Bryant
sql

Load data from web page into sp (sql2000)

Hi, using sql server 2000, is there a way I can load data into a stored
procedure using just a web address? The data will just be text/xml or
some such.
cheers,
ChrisHello Chris,
Not easily sorry.
Easy in SQL 2005 with a CLR function.
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons

> Hi, using sql server 2000, is there a way I can load data into a
> stored procedure using just a web address? The data will just be
> text/xml or some such.
> cheers,
> Chris|||Simon Sabin wrote:
> Not easily sorry.
> Easy in SQL 2005 with a CLR function.
>
> Simon Sabin
> SQL Server MVP
> http://sqlblogcasts.com/blogs/simons
Thanks Simon.. I'm currently figuring it out using ado in an activex
script... would probably do it quicker upgrading to 2005 :D
cheers,
Chris

Load data from web page into sp (sql2000)

Hi, using sql server 2000, is there a way I can load data into a stored
procedure using just a web address? The data will just be text/xml or
some such.
cheers,
Chris
Hello Chris,
Not easily sorry.
Easy in SQL 2005 with a CLR function.
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons

> Hi, using sql server 2000, is there a way I can load data into a
> stored procedure using just a web address? The data will just be
> text/xml or some such.
> cheers,
> Chris
|||Simon Sabin wrote:[vbcol=seagreen]

> Not easily sorry.
> Easy in SQL 2005 with a CLR function.
>
> Simon Sabin
> SQL Server MVP
> http://sqlblogcasts.com/blogs/simons
Thanks Simon.. I'm currently figuring it out using ado in an activex
script... would probably do it quicker upgrading to 2005 :D
cheers,
Chris

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 CSV-File to sdf-File

I need to import data from csv-file to sdf-database (SQL CE 2.0).
When I copy the csv-file to my mobile device, it thakes more than 1 hour. The sdf-File later has a size of 20MB.

If I create an sdf-File (SQL CE 3.0) on the desktop, it just thakes a few minutes.


Is it possible to create an sdf-File (SQL CE 2.0) on the desktop legally?
My clients don't want to by the SQL-Server, because it should be an inexpensive solution.

Or is there another way to create the database with more performance?

ThanksIt is a good idea to generate the database on the desktop, zip and transfer to device, and then unzip. This is however, only possible with SQL CE 3.1. What prevents you from using 3.1 instead of 2.0?|||

No, it's not possible with SQL CE 2.0 That problem was solved in SQL CE 3.1.

Keep in mind support for SQL CE 2.0 is soon to run out, it's a very good idea to stay away from it. Don’t find yourself in the situation CEDB users found themselves after it was “suddenly” (after about 3 years advanced announcement) dropped from WM 5.0.

|||

On the device, there is windows CE 4.2 and compact Framework 2.0 installed.

My application is created with Visual Studio 2003.

If I install sqlce 3.1 on the device, then I am able to open an sdf file (that I created on the desktop) whith Query Analyzer. But my application still needs sdf files of version 2.0. What must be changed in my project, that i can work whith the new sdf-Files?

|||

You'd need to upgrade to VS 2005 and recompile your application with NETCF V2/SQL CE 3.1. Code probably would remain unchanged.

Existing databases (if any) must be converted from SQL CE 2.0 to SQL CE 3.x format.

Note VS 2005 does not officially support CE 4.2 devices but it works in most cases. You can get trial version and see if it works for you.

|||

OK, i upgradet to VS2005 and compiled my application again.

When I start the application now on device, i get the following error:

System.StackOverflowException in System.Windows.Forms.dll

This error dosn't occur in my old VS2003 project.

The debugger couldn't show me the line, where the error occurs. I just know, that it is not in my code.

So i did some tests and i determined, that the error didn't occur when I show a MessageBox before a special statement. The error will even not occur when i execute the statement later in the code.

Code Snippet

lblUserName.Text = MyDataSet.get_UserName(UserNumber);// here, i get the user name to the UserNumber

//from the database

panel1.Enabled = false;

txtUsr.Enabled = false;

lblUserName.Visible = true;

// MessageBox.Show("test"); //if I show this MessageBox, the error will not occur!

btnExit.Visible = false; //if I execute this line 4 lines later, the error will also not occur

btn_Yes.Visible = true;

btn_No.Visible = true;

label1.Visible = true;

label2.Visible = true;

this.Focus();

public string get_UserName(string UserNumber)

{

string returnwert = "";

this.Make_DB_Connection();

try

{

SqlCeCommand cmd = conn.CreateCommand();

cmd.CommandText = "SELECT username FROM AllUser WHERE usernr = '"+UserNumber+"';";

cmd.ExecuteNonQuery();

SqlCeDataReader rdr = cmd.ExecuteReader();

rdr.Read();

returnwert = rdr.GetString(0);

}

catch(Exception){}

Close_DB_Connection()

return returnwert;

}

public void Close_DB_Connection()

{

if(conn.State == ConnectionState.Open)

{

conn.Close();

}

}

|||

You should use stack trace on the exception to determine where infinite recursion occurred.

Most likely some code in event handlers you trigger by changing UI stuff.

|||

I Found the error and anything is working fine now.

Thank you verry much for your help!!!

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!!!

Load data from .DAT file

Hi All,

I am using Bulk Insert task to laod data from .dat file to SQL table but getting an error below.

[Bulk Insert Task] Error: An error occurred with the following error message: "Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.The bulk load failed. The column is too long in the data file for row 1, column 1. Verify that the field terminator and row terminator are specified correctly.".

Any help will be appreciated.

Thanks.

Check out http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=146250&SiteID=1

Some possible solutions are discussed there.

Thanks,
Loonysan

|||

I've tried those solutions but no luck.

There is another .dat file(much bigger) for different table which works fine.......I have setup the same parameters on both files...one works other fails.

|||have you tried to convert the file to another format using excel?|||Try using the OLE DB stage.|||can the ole db destination handle .dat files? i didn't see any mention of that in the documentation.|||

I found the solution. I had a Format file which I fixed it especially for decimal data types. After fixing the format file it ran pretty smooth and fast :)

Thanks everyone who replied.

|||i have the same problem like you, but i don't have solve, why don't you post your solution,
and how to get data from .dat file using by sql statement
thanks for your help
any supporter can help me, can you show me the detail waysql

Load data from .DAT file

Hi All,

I am using Bulk Insert task to laod data from .dat file to SQL table but getting an error below.

[Bulk Insert Task] Error: An error occurred with the following error message: "Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.The bulk load failed. The column is too long in the data file for row 1, column 1. Verify that the field terminator and row terminator are specified correctly.".

Any help will be appreciated.

Thanks.

Check out http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=146250&SiteID=1

Some possible solutions are discussed there.

Thanks,
Loonysan

|||

I've tried those solutions but no luck.

There is another .dat file(much bigger) for different table which works fine.......I have setup the same parameters on both files...one works other fails.

|||have you tried to convert the file to another format using excel?|||Try using the OLE DB stage.|||can the ole db destination handle .dat files? i didn't see any mention of that in the documentation.|||

I found the solution. I had a Format file which I fixed it especially for decimal data types. After fixing the format file it ran pretty smooth and fast :)

Thanks everyone who replied.

|||i have the same problem like you, but i don't have solve, why don't you post your solution,
and how to get data from .dat file using by sql statement
thanks for your help
any supporter can help me, can you show me the detail way

load csv into SQL Server 2005

I have been pulling my hair out all afternoon trying to figure out an easy
way to import csv files into SQL Server 2005. They are perfmon logs in csv
format with TONS of columns, so creating the table and columns beforehand is
not practical. Isn't there some very easy, straightfoward way to simply
create a table and its columns based up on a csv file import?
thanks in advance,
BillIn SQL Server Managemetn Studio, right click on the database name and
choose Tasks... Import Data. This opens the Import Export Wizard.
Specify a Flat File data source. Give it your .csv file name. If
your csv file has column names in the first line, check that box. Use
Preview to see how it looks, and make whatever adjustments it takes to
make it look right. Keep following the steps, and you should end up
with a new table in your database. It will probably not be exactly
what you want!!! Data types will be a bit screwy, names will probably
not be formatted correctly.
Now script that table so you have a CREATE TABLE command. Edit it
until the names and types are right and make the new table. Then
repeat the process above, but this time in the panel labelled Select
Source and Table Views change the Desitnation to the new table you
created. Take through the rest of the steps and the data should load.
I have simplified things a bit - there are far too many details to go
into here - but the approach should get you where you want to go.
Good luck!
Roy Harvey
Beacon Falls, CT
On Tue, 2 May 2006 16:49:10 -0400, "bu" <bu@.nospam.com> wrote:

>I have been pulling my hair out all afternoon trying to figure out an easy
>way to import csv files into SQL Server 2005. They are perfmon logs in csv
>format with TONS of columns, so creating the table and columns beforehand i
s
>not practical. Isn't there some very easy, straightfoward way to simply
>create a table and its columns based up on a csv file import?
>thanks in advance,
>Bill
>|||Take a look at the Windows utility relog.exe
Linchi
"bu" wrote:

> I have been pulling my hair out all afternoon trying to figure out an easy
> way to import csv files into SQL Server 2005. They are perfmon logs in cs
v
> format with TONS of columns, so creating the table and columns beforehand
is
> not practical. Isn't there some very easy, straightfoward way to simply
> create a table and its columns based up on a csv file import?
> thanks in advance,
> Bill
>
>|||Do you know if that same procedure applies in SQL Server 2005 Express as
well as Standard and the others?
thanks again!
Bill
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:06jf529da1ocliljc48nhkihkli7mm5j99@.
4ax.com...[vbcol=seagreen]
> In SQL Server Managemetn Studio, right click on the database name and
> choose Tasks... Import Data. This opens the Import Export Wizard.
> Specify a Flat File data source. Give it your .csv file name. If
> your csv file has column names in the first line, check that box. Use
> Preview to see how it looks, and make whatever adjustments it takes to
> make it look right. Keep following the steps, and you should end up
> with a new table in your database. It will probably not be exactly
> what you want!!! Data types will be a bit screwy, names will probably
> not be formatted correctly.
> Now script that table so you have a CREATE TABLE command. Edit it
> until the names and types are right and make the new table. Then
> repeat the process above, but this time in the panel labelled Select
> Source and Table Views change the Desitnation to the new table you
> created. Take through the rest of the steps and the data should load.
> I have simplified things a bit - there are far too many details to go
> into here - but the approach should get you where you want to go.
> Good luck!
> Roy Harvey
> Beacon Falls, CT
>
> On Tue, 2 May 2006 16:49:10 -0400, "bu" <bu@.nospam.com> wrote:
>
easy[vbcol=seagreen]
csv[vbcol=seagreen]
is[vbcol=seagreen]|||I do not believe it applies to Express, as I do not think Express
comes with SSIS. SSIS is what the Wizard builds.
Roy
On Tue, 2 May 2006 21:26:51 -0400, "me" <me@.nospam.com> wrote:

>Do you know if that same procedure applies in SQL Server 2005 Express as
>well as Standard and the others?
>thanks again!
>Bill
>
>"Roy Harvey" <roy_harvey@.snet.net> wrote in message
> news:06jf529da1ocliljc48nhkihkli7mm5j99@.
4ax.com...
>easy
>csv
>is
>

load csv into SQL Server 2005

I have been pulling my hair out all afternoon trying to figure out an easy
way to import csv files into SQL Server 2005. They are perfmon logs in csv
format with TONS of columns, so creating the table and columns beforehand is
not practical. Isn't there some very easy, straightfoward way to simply
create a table and its columns based up on a csv file import?
thanks in advance,
BillIn SQL Server Managemetn Studio, right click on the database name and
choose Tasks... Import Data. This opens the Import Export Wizard.
Specify a Flat File data source. Give it your .csv file name. If
your csv file has column names in the first line, check that box. Use
Preview to see how it looks, and make whatever adjustments it takes to
make it look right. Keep following the steps, and you should end up
with a new table in your database. It will probably not be exactly
what you want!!! Data types will be a bit screwy, names will probably
not be formatted correctly.
Now script that table so you have a CREATE TABLE command. Edit it
until the names and types are right and make the new table. Then
repeat the process above, but this time in the panel labelled Select
Source and Table Views change the Desitnation to the new table you
created. Take through the rest of the steps and the data should load.
I have simplified things a bit - there are far too many details to go
into here - but the approach should get you where you want to go.
Good luck!
Roy Harvey
Beacon Falls, CT
On Tue, 2 May 2006 16:49:10 -0400, "bu" <bu@.nospam.com> wrote:
>I have been pulling my hair out all afternoon trying to figure out an easy
>way to import csv files into SQL Server 2005. They are perfmon logs in csv
>format with TONS of columns, so creating the table and columns beforehand is
>not practical. Isn't there some very easy, straightfoward way to simply
>create a table and its columns based up on a csv file import?
>thanks in advance,
>Bill
>|||Take a look at the Windows utility relog.exe
Linchi
"bu" wrote:
> I have been pulling my hair out all afternoon trying to figure out an easy
> way to import csv files into SQL Server 2005. They are perfmon logs in csv
> format with TONS of columns, so creating the table and columns beforehand is
> not practical. Isn't there some very easy, straightfoward way to simply
> create a table and its columns based up on a csv file import?
> thanks in advance,
> Bill
>
>|||Do you know if that same procedure applies in SQL Server 2005 Express as
well as Standard and the others?
thanks again!
Bill
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:06jf529da1ocliljc48nhkihkli7mm5j99@.4ax.com...
> In SQL Server Managemetn Studio, right click on the database name and
> choose Tasks... Import Data. This opens the Import Export Wizard.
> Specify a Flat File data source. Give it your .csv file name. If
> your csv file has column names in the first line, check that box. Use
> Preview to see how it looks, and make whatever adjustments it takes to
> make it look right. Keep following the steps, and you should end up
> with a new table in your database. It will probably not be exactly
> what you want!!! Data types will be a bit screwy, names will probably
> not be formatted correctly.
> Now script that table so you have a CREATE TABLE command. Edit it
> until the names and types are right and make the new table. Then
> repeat the process above, but this time in the panel labelled Select
> Source and Table Views change the Desitnation to the new table you
> created. Take through the rest of the steps and the data should load.
> I have simplified things a bit - there are far too many details to go
> into here - but the approach should get you where you want to go.
> Good luck!
> Roy Harvey
> Beacon Falls, CT
>
> On Tue, 2 May 2006 16:49:10 -0400, "bu" <bu@.nospam.com> wrote:
> >I have been pulling my hair out all afternoon trying to figure out an
easy
> >way to import csv files into SQL Server 2005. They are perfmon logs in
csv
> >format with TONS of columns, so creating the table and columns beforehand
is
> >not practical. Isn't there some very easy, straightfoward way to simply
> >create a table and its columns based up on a csv file import?
> >
> >thanks in advance,
> >Bill
> >|||I do not believe it applies to Express, as I do not think Express
comes with SSIS. SSIS is what the Wizard builds.
Roy
On Tue, 2 May 2006 21:26:51 -0400, "me" <me@.nospam.com> wrote:
>Do you know if that same procedure applies in SQL Server 2005 Express as
>well as Standard and the others?
>thanks again!
>Bill
>
>"Roy Harvey" <roy_harvey@.snet.net> wrote in message
>news:06jf529da1ocliljc48nhkihkli7mm5j99@.4ax.com...
>> In SQL Server Managemetn Studio, right click on the database name and
>> choose Tasks... Import Data. This opens the Import Export Wizard.
>> Specify a Flat File data source. Give it your .csv file name. If
>> your csv file has column names in the first line, check that box. Use
>> Preview to see how it looks, and make whatever adjustments it takes to
>> make it look right. Keep following the steps, and you should end up
>> with a new table in your database. It will probably not be exactly
>> what you want!!! Data types will be a bit screwy, names will probably
>> not be formatted correctly.
>> Now script that table so you have a CREATE TABLE command. Edit it
>> until the names and types are right and make the new table. Then
>> repeat the process above, but this time in the panel labelled Select
>> Source and Table Views change the Desitnation to the new table you
>> created. Take through the rest of the steps and the data should load.
>> I have simplified things a bit - there are far too many details to go
>> into here - but the approach should get you where you want to go.
>> Good luck!
>> Roy Harvey
>> Beacon Falls, CT
>>
>> On Tue, 2 May 2006 16:49:10 -0400, "bu" <bu@.nospam.com> wrote:
>> >I have been pulling my hair out all afternoon trying to figure out an
>easy
>> >way to import csv files into SQL Server 2005. They are perfmon logs in
>csv
>> >format with TONS of columns, so creating the table and columns beforehand
>is
>> >not practical. Isn't there some very easy, straightfoward way to simply
>> >create a table and its columns based up on a csv file import?
>> >
>> >thanks in advance,
>> >Bill
>> >
>

load CatalogItem array in treeview

Hi,

i would like to load my array 'items' in a treeview

CatalogItem[] items = rs.ListChildren("/", true);

is there anyway that automatically does the layout or do i have to check what the type is of everey object so I can indent correctly.

thanks
I'm really looking for this one :).

I'm trying to do it manually but I can't find a way to get the reports in the right structure. I'll show what I want to accomplish and how I am trying it now:

WANTED LIST:
+ Adventureworks
- Company Sales
- Employee Sales Summary
+ Subfolder
- Report from subfolder
- Report from subfolder

Code trying to get there (not thinking of subfolders yet):

rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
CatalogItem[] items = rs.ListChildren("/", false);
foreach (CatalogItem ci in items)
{
cmbRapporten.Nodes.Add(ci.Name);
CatalogItem[] test = rs.ListChildren("/" + ci.Name.ToString(), false);
foreach(CatalogItem ti in test)
{
cmbRapporten.Nodes.Add(ti.Name);
}
}
EXPLANATION

I ask for the root folder's children (not recursive) and then list them in my treeview cmbRapporten then I create a new CatalogItem[] = test, where I list the children of the current folder in the CatalogItem[] items. Everything appears fine but it's all in one line down. How do I couple them with their parents folder.

greetings
|||Hi,

so I got there to fill the treeview not looking at subfolders with this code (pretty simple if you ask me ;))

[CODE]
ReportingService2005 rs = new ReportingService2005();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
CatalogItem[] items = rs.ListChildren("/", false);
foreach (CatalogItem item in items)
{
cmbRapporten.Nodes.Add(item.Name);
if (item.Type.ToString() == "Folder")
{
CatalogItem[] childs = rs.ListChildren("/" + item.Name.ToString(), false);
foreach (CatalogItem child in childs)
{
cmbRapporten.Nodes[counter].Nodes.Add(child.Name);
}
counter++;
}
}
[/CODE]

Gives me a nice treeview in the designer but I'm still not content ;).

If one of the items in the object childs is a folder then there should be added another subnode. I'll visualize it for better understanding:

Now i support:

+ FOLDER
-REPORT
-REPORT
-SUBFOLDER
-REPORT

But I want the subfolder to display it's items too. So I will have to make a generic method and then call it with two parameters i thought. The string path wich is the path on the report server that should List it's children. Second of al I have to pass the Node number. But sometimes I will have to pass one node number while other times I will have to pass multiple node numbers... I have no idea to make such an method. Could somebody help with this.

Do I make sense or should I rephrase everything.

Greetings

load both parent and child into one table!

Hi, how can load both parent and child into one table use the
SQLXMLBulkload.3.0 object like following? Thanks a lot.
Hongtao
<xml>
<ti>date</ti>
<origin>name</origin>
<title>
<titledetail>content</titledetail>
</title>
</xml>
into table
CREATE TABLE Title (
ti VARCHAR (100) NOT NULL ,
origin VARCHAR (100) NOT NULL ,
titledetail VARCHAR (100) NOT NULL )
)
GO
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
You would create an XSD where the "xml" element maps to a table and "ti",
"origin", and "Titledetail" map to columns. Then set sql:is-constant="true"
on the "title" element. I think that should do it.
Irwin
"henry job" <anonymous@.comcast.com> wrote in message
news:uL7O71LBFHA.3840@.tk2msftngp13.phx.gbl...
>
> Hi, how can load both parent and child into one table use the
> SQLXMLBulkload.3.0 object like following? Thanks a lot.
> Hongtao
> <xml>
> <ti>date</ti>
> <origin>name</origin>
> <title>
> <titledetail>content</titledetail>
> </title>
> </xml>
> into table
> CREATE TABLE Title (
> ti VARCHAR (100) NOT NULL ,
> origin VARCHAR (100) NOT NULL ,
> titledetail VARCHAR (100) NOT NULL )
> )
> GO
>
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
|||Hi Irwin, thank you very much. I am new with XML. Data xml like
following. Could you post an XSD? thank you very much!!
Hongtao
<xml>
<ti>date</ti>
<origin>name</origin>
<title>
<titleid>id</titleid>
<titledetail>content</titledetail>
</title>
</xml>
into table
CREATE TABLE Title (
ti VARCHAR (100) NOT NULL ,
origin VARCHAR (100) NOT NULL ,
titledetail VARCHAR (100) NOT NULL )
)
GO
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||I believe it would be something like:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xsd:element name="xml" sql:relation="foo" >
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ti" sql:field="bar1" />
<xsd: element name="origin" sql:field="bar2"/>
<xsd:element name="title" sql:is-constant="true">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="titleid" sql:field="bar3"/>
<xsd:element name="titledetail" sql:field="bar4"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
You would have to change "foo" to the table name and "bar" 1-4 to column
names, and may need to / want to add data type info.
"henry job" <anonymous@.comcast.com> wrote in message
news:ucJe2XOBFHA.3524@.TK2MSFTNGP15.phx.gbl...
> Hi Irwin, thank you very much. I am new with XML. Data xml like
> following. Could you post an XSD? thank you very much!!
> Hongtao
> <xml>
> <ti>date</ti>
> <origin>name</origin>
> <title>
> <titleid>id</titleid>
> <titledetail>content</titledetail>
> </title>
> </xml>
> into table
> CREATE TABLE Title (
> ti VARCHAR (100) NOT NULL ,
> origin VARCHAR (100) NOT NULL ,
> titledetail VARCHAR (100) NOT NULL )
> )
> GO
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
|||Hi Irwin, thank you very much.
Hongta
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||I've looked *everywhere* for something like this, and this is the best
example ever!
KB Article 316005 should include this information.
Chris Leiter
MCSE CCNA MCT MCDST MCSA
"Irwin Dolobowsky [MS]" wrote:

> I believe it would be something like:
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
> <xsd:element name="xml" sql:relation="foo" >
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="ti" sql:field="bar1" />
> <xsd: element name="origin" sql:field="bar2"/>
> <xsd:element name="title" sql:is-constant="true">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="titleid" sql:field="bar3"/>
> <xsd:element name="titledetail" sql:field="bar4"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
>
> You would have to change "foo" to the table name and "bar" 1-4 to column
> names, and may need to / want to add data type info.
>
> "henry job" <anonymous@.comcast.com> wrote in message
> news:ucJe2XOBFHA.3524@.TK2MSFTNGP15.phx.gbl...
>
>
sql