DTS - Reading From A File , Transforming And Storing In Table

Jan 14, 2002

Hi ... I need to read rows from a large source file , check if the data selected already exists in the destination and if it does, upate the destination , else insert a new row . Now i could use a sp, but that means i have to call it for each row in the text file ...
any ideeas on what kind of package can be created /

cheers
benjamin

View 1 Replies


ADVERTISEMENT

Reading From One Table And Then Storing It Into Another Table

Feb 13, 2007

I want to (and succeeded)  read information from one table in my database ([services] in this case) and display them in a table with an additional column with a textbox so that I can enter volumes in it. So far so good, this works fine. But I now want to store all the volumes together with the ID's in a seperate table ([service_volume]) by clicking the Submit button.
Does anyone know how to achieve this?
 <%@ Page Language="VB" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Show Services</title>
</head>
<body>
<form id="form1" runat="server">

<asp:Repeater
id="rptVolumes"
runat="server"
DataSourceID="SqlDataSource1">
<HeaderTemplate>
<table border="1" width="100%">
<tr>
<th>Service ID</th>
<th>Service Name</th>
<th>Volume</th>
</tr>
</HeaderTemplate>

<ItemTemplate>
<tr>
<td><asp:Label id="lblService_ID" runat="server" Text='<%#Eval("service_id")%>'></asp:Label></td>
<td><asp:Label id="lblService_Name" runat="server" Text='<%#Eval("service_name")%>'></asp:Label></td>
<td>
<asp:TextBox id="intVolume" Runat="server" />
</td>
</tr>
</ItemTemplate>

<FooterTemplate>
</table>
<asp:Button ID="Button1" runat="server" Text="Submit" OnClick="btnStoreInfo" />
</FooterTemplate>

</asp:Repeater>
  
<asp:SqlDataSource
ID="SqlDataSource1"
runat="server"
ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
SelectCommand="SELECT [service_id], [service_name] FROM [services]">
</asp:SqlDataSource>

</form>
</body>
</html> 

View 1 Replies View Related

Storing A .wav File In A Table

Jul 16, 2002

Is it possible to store a .wav file in a SQL Server table? I have looked in books online and on the web... to no avail. Any info would help.

Thanks
Mike

View 1 Replies View Related

Storing A Dynamic File Name Table

Apr 17, 2014

I have a file that is automatically generated by an external process that will always have the same name + a date stamp.I will say test_(Datestamp).txt

what i am trying to do is use sql to bulk insert this file but i will not know the full file name as the date stamp is also includes time. What my script is doing is taking this file everyday storing its contents temporarily in a table where i then use a trigger to edit and repopulate the table and kick out a new file that another external process uses.

View 4 Replies View Related

Which Is Better? Storing Data In The Database OR Storing It In The File System

Dec 29, 2006

Hello there,I just want to ask if storing data in dbase is much better than storing it in the file system? Because for one, i am currenlty developing my thesis which uploads a blob.doc file to a web server (currently i'm using the localhost of ASP.NET) then retrieves it from the local hostAlso i want to know if im right at this, the localhost of ASP.NET is the same as the one of a natural web server on the net? Because i'm just thinking of uploading and downloading the files from a web server. Although our thesis defense didn't require us to really upload it on the net, we were advised to use a localhost on our PC's. I'll be just using my local server Is it ok to just use a web server for storing files than a database?    

View 6 Replies View Related

Integration Services :: Reading Data File Present In A File System From A Package Deployed In SSIS DB?

Dec 4, 2014

I am trying to create and later read a data file from a package deployed in SSISDB, but it is not reading it while it is successfully creating the file. The same package when run from the file system package, runs successfully. Generating ispac and deploying in SSISDB is running for infinite time. Is it a permission issue?

View 7 Replies View Related

Reading Log File

Feb 9, 2000

I have some records that have been deleted. I need to find out who did it and to do that I need to read the logs. Are there any utilities that will allow me to read login 7.0? How about 6.5?

Chris

View 2 Replies View Related

Reading A Ini File In DTS

Jun 10, 2002

Hi

How can I read an ini file entry and pass this parameter to a stored procedure which will be run in a DTS Package?


Thanks for the input

mipo

View 2 Replies View Related

Reading Log File

Jun 22, 2008

How do I view the SQL 2005 transaction log file(.ldf)?

Is there a built-in utility?

Thank you

View 3 Replies View Related

Reading A File

Jun 24, 2008

I am storing one text file on the server.This text file contains some mobile numbers.The file look like
009198XXXXXXXX
009198XXXXXXXX
009198XXXXXXXX
009198XXXXXXXX
etc

Here I need to read this text file row by row mobile number and then insert these mobile numbers into a table by using sql procedure or sql trigger or any other method or coding. Is it is possible or not?
If so then anybody can help me!

regards
Shaji

View 4 Replies View Related

Reading ID From XML File???

Jul 13, 2006

Hello friends...

We have sql server 2000 and i need to read one perticular xml and from that i want ID field stored in one table...is it possible by query analyzer to read xml and stored ID in table...I have only path of that xml file...



like



select ID from ("D:XMLFolder*.xml)



that i want

View 2 Replies View Related

Reading In An XML File From A URL

Oct 17, 2006

Hi

I have a problem with SSIS in that I need to read an XML file in from a URL,which brings me back the below XML. What I need to be able to do is essentially create a single record, including the nested XML <image> into the same record. This information then needs to be entered into a database table.

What I found is that if I use a data flow component, and have an XML source pointing to this URL, it essentially creates a different output for every level of nesting. This causes me serious issues because I would then have to somehow get to the information in the <image> tag, and then get everything below that, etc, to be able to get the images related to each <stock> record. This is a pain.

I also looked at using an XML task, where I could use an XSLT to transform to the required output, however, I can't point this XML task to a URL to retrieve the XML.

If anyone has any ideas I would greatly appreciate it

Thanks

Darrell



XML Format

------------------

<feed date="2006-10-17 17:08:46">

<usedstock>

<stock id="SFU22991">

<make>Peugeot</make>

<model>206</model>

<description>Peugeot 206 1.4 X-Line, 5 door Hatchback Tiptronic Auto 4Spd</description>

<hotline>08451553610</hotline>

<spec>Air Conditioning, Power Steering, Central Locking, Electric Windows, Alloy Wheels, CD Player</spec>

<deepurl>http://www.regvardy.com/used_car/dseller/SFU22991</deepurl>

<search>http://www.regvardy.com/used_cars/dseller/Peugeot/206</search>

<regdate>2005-01-27</regdate>

<colour>Blue</colour>

<price>7495</price>

<stocktype>USED</stocktype>

<category>Small</category>

<transmission>Tiptronic Auto 4Spd</transmission>

<bodystyle>Hatchback</bodystyle>

<fueltype>Petrol</fueltype>

<type>NCV</type>

<doors>5</doors>

<engine>PE0BC</engine>

<capcode>PE2614SED5HPIA</capcode>

<capid>26440</capid>

<image>

<urls>

<url>http://www.regvardy.com/imagedata/vehicles/g/pj54lyg_1.jpg</url>

<url>http://www.regvardy.com/imagedata/vehicles/g/pj54lyg_2.jpg</url>

<url>http://www.regvardy.com/imagedata/vehicles/g/pj54lyg_3.jpg</url>

</urls>

<libraryimage/>

</image>

</stock>

</usedstock>

</feed>

View 4 Replies View Related

ASP.NET: Reading A CSV File With C#

Jan 22, 2008

I am trying to read from a datasource that is a CSV file using C#, but for some reason I keep getting an error that says:

System.Exception: System.Data.OleDb.OleDbException: Syntax error in FROM clause.

My code looks like this:


String sql = " SELECT IDnumber FROM report.csv WHERE username = @Username ";



ArrayList parameters = new ArrayList();

parameters.Add(new OleDbParameter("@Username", Username));

DataTable dt = OleDbUtility.getDataTable(sql, parameters, OleDbUtility.GetCNetIDConnectionString());


It worked with an Excel file, so any ideas on this one?
It seems like the connection string is fine...

View 6 Replies View Related

Reading A File Name That Changes

Mar 13, 2007

Brand new to SSIS so bear with me, if something is obvious.

I want to be able to read a file from a certain directory. But the file name changes every day. So today its File20061203 tomorrow File20061304 or the next day it could be FileNB4434. The format in the file will always be the same though. I just want for a user to be able to drop a file in a directory and the package pick it up once a day.

Would I have to to create a script task or could I use a variable. I have been trying to use the variable but have not been able to get them to work. This calls for only looking for 1 text file in a folder but any additional links that show some good variable examples would be appreciated. One where only part of the variable changes File(Variable)Division.txt

Thanks in advance

View 1 Replies View Related

Reading XML File

Jul 21, 2007

Hello,
I'm trying to read data from xml file (i want to use this file as enviornment config file). i tried 2 methods and failed in both of them:
1.a. I loaded the XML file to the report server
1.b. I wrote a custom code for reading the XML. i got #Error

2.a. I loaded the XML file to the report server
2.b. I used XML dataset for reading the XML file.


thank you all

View 3 Replies View Related

Reading In A Text File

Sep 25, 2007

I need to know how to import a text file into a stored procedure as one big varchar.  I don’t want to import the data straight into my tables.  I need to be able to work with it in the stored proc.

View 2 Replies View Related

Reading A Text File

Jan 18, 2005

hi

I need to read a hex file, the file path is in the database, and I need to read the file from sql.

Any help would be appresiated

View 2 Replies View Related

Reading From An Excel File

Feb 7, 2002

I need to select a list of rows from excel file.
I formed my query in this way :
SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="MOC02c:empest/xls";Extended properties=Excel 97-2000')...xactions
This gives an error

Error is
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
[OLE/DB provider returned message: Could not find installable ISAM.]

If anybody knows how to read from an excel file to a query analyser , pelase reply.
Regards
Suresh

View 1 Replies View Related

Reading Data From File

May 25, 1999

Is there any way to read a text file with one value in it and load that value into a variable?

View 1 Replies View Related

Reading Sql From A Disk File

Feb 20, 2004

It's probably a really easy thing to do, but I can't find out how to do it, so hopefully somebody can spare the time to help.

I want to read in T-SQL contained in a file held on disk and execute it in a stored procedure.

Anybody know how to get the contents of the text file into a variable so I can exec it ?

Thanks for your time.

View 4 Replies View Related

Reading Sql From A Disk File

Feb 20, 2004

It's probably a really easy thing to do, but I can't find out how to do it, so hopefully somebody can spare the time to help.

I want to read in T-SQL contained in a file held on disk and execute it in a stored procedure.

Anybody know how to get the contents of the text file into a variable so I can exec it ?

Thanks for your time.

View 1 Replies View Related

Reading XML File SQL Server

Feb 27, 2004

hi to all
I have been trying to read XML file in SQL Server with Stored Procedure. but i coud't get any solution.

can any one Help me.

I have XML file with List Of Countryes each Country has Id.

I need to read all Country Id,CountryName and need to be insert into DataBase or Return as String (output parameter).

How do I achive this? please Help me.

Cheers
:confused:
Buddu

View 1 Replies View Related

Reading A Text File

May 2, 2007

Guys, need help! I know this is not area for VBScript question, but possible I will find someone to help. Here is my question.

How can I read a text file of product IDs (ProductID contain only the first three character at the bigining of each line -- for example 220)and retrieve just those lines that meet a specified pattern?

Thk

View 4 Replies View Related

Finding Changes By Reading The Log File

May 27, 2008



When importing data from a source server it is useful to know which rows have changed since the last import. Is there a good way to get this information from the SQL Server log files? Does "dbcc log" provide this function, for example? Is this something that is done a lot or would it be considered a kludge?

Thanks,
Ron Rice

View 6 Replies View Related

Reading From A File Which Changes Its Name Dynamically

Oct 7, 2007

Hi,I have a requirement to load data from a flat file.The flat file has a naming convention and thus a timestamp is appended to it. eg : RMRS_07102007_001.delThis makes the file name different each day, Is there any method where by I can provide a dynamic name in the file connection manager.P.S. I tried a variable in For each loop with file enumatror and stored that in a variable , but I was not able to use that variable in File connection manager. pls guide if i was missing anything.Thanks in Advance, Ashish Prasad

View 1 Replies View Related

Reading Text File

Oct 16, 2006

does anyone here have a sample to how mssql can read a comma delimeted textfile...

View 1 Replies View Related

Reading A Flat File

Dec 12, 2006

I get the following error when reading a flat file : [Credit Information 1 [1]] Error: Data conversion failed. The data conversion for column "AccountName" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

I did check all the mappings, and everything seems to be fine, the field is read in as a string. I also check for any strange characters that can possibly cause this error but the value of the field only contains a person's name and spaces at the end.

Does anyone have any ideas what might be the cause of the error?

View 1 Replies View Related

Storing File

Nov 21, 2007



Is there any method to store the MP3 file in database. And also I want free text search in the table? Please help me its important

Thanks in advance

View 3 Replies View Related

Reading Or Writing A File To A SQL Database

Nov 22, 2004

Halo, I am a bit new to this
Please can someone help me, I would like to write a file(Any type) to a SQL database like a attached document(s) for the current record and be able to detatch the document when needed.
I use VB.NET for a ASP.NET app.
I basicly would like to attach documents to a piece of equipment may it be any kind and if the user views the equipment he will be able to detatch the documents for that piece of equipment and open it with the correct software.
PLEASE HELP!!!!!!!

View 1 Replies View Related

Reading Query From .sql File Error

Feb 4, 2005

I have a report that is based on a query that is read from a .sql file and is executed in the stored procedure. I found this code on the internet. When I run the SP in Query Analyser it tells me that "2 rows have been affected". I don't know why I don't get the data. Any help??

Stored procedure:

CREATE PROCEDURE TimeTracker_Report_ClientNumbers2

AS
DECLARE @SQLQuery as NVARCHAR(4000)
BEGIN
CREATE TABLE #tmpQuery (Query NVARCHAR(4000))
BULK INSERT #tmpQuery FROM '\servernameQueriesReport_ClientNumbers.sql'
SELECT @SQLQuery = Query FROM #TMPQUERY
EXECUTE sp_executesql @SQLQuery
END
GO

and Report_ClientNumbers.sql contains the following query:

SELECT Name, ClientNumber FROM Companies WHERE Not ClientNumber IS NULL ORDER BY ClientNumber

View 1 Replies View Related

I/O Error Reading BCP Format File

Jul 20, 2000

I added a field to an exisiting table (CHAR 30), and I added to field to the BCP Format File.
The BCP worked fine before the new field, and still works fine when I exclude the new field
from the format file, but with the new field I receive the following error:

SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]I/O error while reading BCP format file

(2 row(s) affected)

Here is a copy of my format file:
7.0
11
1 SQLCHAR 0 6 "" 1 Empl_ser_no
2 SQLCHAR 0 2 "" 2 Empl_stat_cd
3 SQLCHAR 0 1 "" 3 Guest_type_fl
4 SQLCHAR 0 30 "" 4 Job_tl
5 SQLCHAR 0 14 "" 5 Pager_no
6 SQLCHAR 0 1 "" 6 Security_Clear_fl
7 SQLCHAR 0 9 "" 7 SSN
8 SQLCHAR 0 30 "" 8 Emer_cont_nm
9 SQLCHAR 0 14 "" 9 Emer_cont_no
10 SQLCHAR 0 1 "" 10 Citizen_fl
11 SQLCHAR 0 30 "
" 11 Job_Res

The input file is just a fixed positonal text file, and I have checkid it 100 times- it is fine.

Any sugestions from any BCP gurus out there? THANKS

View 1 Replies View Related

SQL 2005 Reading File Attributes

Dec 12, 2007

In SQL 2005, is it possible to read the date modified of a file which is located on the hard drive of the server? Is there a procedure/function that would allow you to do so?

View 6 Replies View Related

Reading Tab Delimited Text File

Mar 28, 2008

Is there anyway Sql Server reads a "Tab Delimited Text File" and Compare each record with the Column in a table..

my question is..

I've a Country_Code table which has 3 letter Country Code and the Actual Country names are listed in a Tab Delimited Text File "Country Data" with Country Code and Country Name, how do i read each record and compare to get the Actual Country Name for Display.

any ideas/suggestions.

thanks

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved