Tag: file

How to check for windows file transfer and start SSIS package?

I am new to SSIS development. I need to run SSIS package after file received to the server. I am following these steps: 1. First created my SSIS package with Script Task in it to check for file exists. If exists it will continue with next steps in the package. 2. Created SSMS Schedule job […]

Parsing performance of row data from files to SQL Server database

I have the PAF raw data in several files (list of all addresses in the UK). My goal is to create a PostCode lookup in our software. I have created a new database but there is no need to understand it for the moment. Let’s take a file, his extension is “.c01” and can be […]

PHP XML return stream being truncated from SQL 2008

I am having trouble getting a full XML result returned from an MS SQL 2008 R2 instance when using sqlsrv_get_field in PHP. This is my code: $statement = sqlsrv_query( $AnalysisConnection,$sql); if( $statement === false ) { die( print_r( sqlsrv_errors(), true)); } $rows = sqlsrv_has_rows($statement); if($rows === false) { print (“no rows”); } sqlsrv_fetch($statement); $finalXML = […]

SQL Server Management Studio – Query using text file

Let’s say I have a text file that has the following lines 102 333 534 Then, in my SQL table, I have a few different columns: AutoID | Name | Description ————————————– 102  | Jackson  | [Description Here] 241  | Edward   | [Description Here] 333  | Timothy  | [Description Here] 437  | Nikky    | [Description Here] 534  | Jeremy   | [Description Here] Is there anyway I can parse the text […]

Importing .sql file into new DB use SSMS

I have been instructed, at school, to create a operational DB in SSMS. I was given a .sql file containing the following queries. EXECUTE usp_RecordPatientVisit ‘1-24’, ‘8/1/2012’, ‘125/80’, 125.8, 45, 5, ‘No progress’ EXECUTE usp_RecordPatientVisit ‘1-24’, ‘8/15/2012’, ‘125/80’, 126.7, 45, 4, ‘Better’ EXECUTE usp_RecordPatientVisit ‘1-24’, ‘8/27/2012’, ‘130/70’, 125.9, 60, 3, ‘Happy’ EXECUTE usp_RecordPatientVisit ‘1-24’, ‘9/7/2012’, […]

MS SQL xml query to file

I need to save my query result in SQL Server 2014 Management Studio to specific path in the server. I know that I can do it via bcp utility, but I have to use something else (because of the performance). Is it possible to do something like in MySQL? SELECT * INTO OUTFILE ‘[path]’ In […]

SSIS: Transform data to fixed width text with variable rows

I’m trying to make a plain text with SSIS from a SQL select. The problem is that SSIS makes the file like a table, and I need it in a specific format. For example, I have this result: bill_id | concept |concept_type |amount | ———–|————|————-|——-| 334455 |concept1 |product |12 | 334455 |concept2 |product |10,5 | […]

Best way of sending a file to SQL server and save it, then reading it from DB?

I am developing a software with vb6.0 🙁 . I wanna to know that what the best code for saving a file in SQL server and then reading from it is? I should say that I use ADODB.Stream when saving file….. what is you suggestion?

Populate SQL database from textfile on a background thread constantly

Currently, I would like provide this as an option to the user when storing data to the database. Save the data to a file and use a background thread to read data from the textfile to SQL server. Flow of my program: – A stream of data coming from a server constantly (100 per second). […]

How can I run a virus scan on files in VB.NET before storing them in SQL Server 2005 database?

I want to upload media and textual files inside the database for my personal use. I have been successful in adding all the files to the database, but I want to scan each file for viruses before uploading it into the database so that a infected file could not be stored inside the database. How […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.