Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server






SuperbHosting.net & Arvixe.com have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for BigResource.com.







Cobol Data File To SQL Table Conversion


I am a novice in data base designing. I have MS certification in both design, implementation and administration. Can anyone help me provide information regarding converting from Cobol flat files to sql server tables ?
I will be very grateful.. This is my first assignment.. Got to prove myself... help....


View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Cobol Conversion
This nifty function convert COBOL value to equivalent integer.

If last characer is one of these alphanumeric charactersJ -1
K -2
L -3
M -4
N -5
O -6
P -7
Q -8
R -9
} -0it means that complete value is negative and last character is the equivalent numeric in table above.CREATE FUNCTION [dbo].[fnCobol2Int]
(
@Item VARCHAR(18)
)
RETURNS BIGINT
AS
BEGIN
RETURNCAST(
CASE
WHEN @Item LIKE '%[^}jklmnopqr0123456789JKLMNOPQR]%' THEN NULL
WHEN LEFT(@Item, LEN(@Item) - 1) LIKE '%[}jklmnopqrJKLMNOPQR]%' THEN NULL
WHEN RIGHT(@Item, 1) LIKE '[}jklmnopqrJKLMNOPQR]' THEN '-'
ELSE ''
END + LEFT(@Item, LEN(@Item) - 1) + CHAR(47 + CHARINDEX(RIGHT(@Item, 1), '}JKLMNOPQR0123456789}jklmnopqr') % 10) AS BIGINT)
END
E 12°55'05.25"
N 56°04'39.16"

View Replies !   View Related
What Is The Best Practice To Handle Cobol Redeines In Flat File Data.


Here is my idea but I am looking for the best practice.

Each record can have 3 possibilites.

I would read and write the data 3 times to different tables and add an identity key on all 3 files then I would reassembe the data back together on the identity key and map the data to a fourth and final table.

Any other ideas?



Thanks,

Larry



View Replies !   View Related
Sql Server Data To Cobol Format
Hi,
I have a need to convert sql server data to cobol format. Has anyone done this?

View Replies !   View Related
SSIS Flat File Loading - Data Type Conversion
It seems I can do the type conversion in two place:

1. The advanced editor for flat file source => Input and output roperties. And I can set the output columns data type properties there.

2. Using a Data conversion box in Data flow transformation.

Any difference between these two? Which one should be used?

View Replies !   View Related
SSIS:Data Conversion Failed On Flat File Destination
[Flat File Destination [46500]] Error: Data conversion failed. The data conversion for column "Column 0" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page." What does this error mean exactly?

I am taking columns from a flat file source. Then I am adding some new columns then rewriting the file to a ragged file format with fixed column values. I've taken the Destination component off and it works fine. So I know it could be the destination component but what could it be? Any ideas?

View Replies !   View Related
Csv File Import: Bulk Insert Data Conversion Error (type Mismatch)
Hi,

Iam trying to import data from a csv file into my table in SQL Server 2000. My table is called as temp_table and consists of 3 fields.

column datatype
-------- -----------
program nvarchar(20)
description nvarchar(50)
pId int

pId has been set to primary key with auto_increment.

My csv file has 2 columns of data and it looks like follows:

program, description
"prog1", "this is program1"
"prog2", "this is program2"
"prog3", "this is program3"


Now i use BULK INSERT like this

"BULK INSERT ord_programs FROM 'C:datafile.csv' WITH (FIELDTERMINATOR=',', ROWTERMINATOR='', FIRSTROW=2)"

to import data into my table in SQL server and it gives me this error

"Bulk insert data conversion error (type mismatch) for row 2, column 3 (pId)"

I guess i have to use fileformat or something since i dont have anything for pId field in the csv file to make it work...

Please help me out guys and please post a snippet of code if you have.

Thank You.

View Replies !   View Related
Data Conversion Errors On Excel Import Into Existing Table
Recently installed Sql Server 2005 client and am now attempting to import data from a spreadsheet into an existing table. This works fine with Sql Server 2000 but I am getting data conversion truncation errors that stop the process when this runs using import utility in Sql Server 2005.

Any help would be appreciated.

View Replies !   View Related
Question About Automating Data Conversion And Updates To A Table In SQL Database
Hello,

I will be getting data in either Excel or Access form on a daily basis. I would like to automate the process of converting this (excel or access) data to a table in an existing SQL database. Since this conversion needs to performed on a daily basis, note that I need to update the table that contains data from the day before.

Is it possible to do this and if it is possible, can someone tell me how to do it.

Thanks in advance,

Joe green

View Replies !   View Related
Cobol -&> SQL2005
I'm not "cobol person" but now, I have to bind a cobol application (from mainframe) to query SQL 2005

Have somebody had this task?

View Replies !   View Related
Upload Database From Sql 7 To COBOL???
I developed a database in MS SQL server7. But the main database was developed in COBOL. Is there anyway I can upload my
database to mainfram? Thank you in advance.

View Replies !   View Related
Create Table From Text File, Extract Data, Create New Table From Extracted Data....
Hello all,

Please help....

I have a text file which needs to be created into a table (let's call it DataFile table). For now I'm just doing the manual DTS to import the txt into SQL server to create the table, which works. But here's my problem....

I need to extract data from DataFile table, here's my query:

select * from dbo.DataFile
where DF_SC_Case_Nbr not like '0000%';

Then I need to create a new table for the extracted data, let's call it ExtractedDataFile. But I don't know how to create a new table and insert the data I selected above into the new one.

Also, can the extraction and the creation of new table be done in just one stored procedure? or is there any other way of doing all this (including the importation of the text file)?

Any help would be highly appreciated.

Thanks in advance.

View Replies !   View Related
Exported Flat File Data Will Not Import To Same Table Without Extensive Data-type Manipulation
I'm moving data between identical tables and have to use a flat file as an intermediary. I thought: "No problem, SSIS can do a quick export to a file, then move the file to another server, then use SSIS to import the data to the new server."



Seems simple, right?



I'm hitting all sorts of surprising data conversion errors. I used the export wizard to create the export package. This works fine. However using the same flat file definition, the import package fails -- even when I have no destination. That is I have just one data flow task that contains only one control: the Flat File source. When I run the package the flat file definition fails with data type conversion and truncation errors. One of the obvious errors is for boolean types. The SQL field is a bit, SSIS defined the column as DT_BOOL, the output of the data are literal text values "TRUE" and "FALSE". So SSIS converts a sql datatype of bit to "TRUE" and "FALSE" on export, but can't make the reverse conversion on import?



Does anyone else find this surprising?I would expectthat what SSIS exports, it can importgiven all the same table and flat file definitions. Is SSIS the wrong tool to do such simple bulk copies? I'd like to avoid using BCP because this process will need to run automatically within SQL Agent so we can leverage all the error tracking and system monitoring.





View Replies !   View Related
How To Convert Cobol ZONED Decimal Using SSIS
Hi

I am new to this forum and SSIS also.

I searched but could not find any answer here so I am posting my question.

We get some cobol text file that has Zoned Decimal also.

We want to use SSIS to convert the file in to SQL Server Database but we want to avoid using 3rd party s/w..

In DTS it was not possible..

Is it possible to convert Zoned Decimal to Decimal in SQL Server.



Thanks in advance.

PraRav

View Replies !   View Related
VSAM Cobol Files (Array Format): Connector For SSIS
Hi ,

Just wondering what is the way to connect to Cobol VSAM files (data in array format) using SSIS ?



Where can I get the OLEDB/ODBC drivers for the same?



Thx,

Gaurav

View Replies !   View Related
Data Conversion Failed. The Data Conversion For Column &&"value&&" Returned Status Value 4 And Status Text &&"Text Was Truncated Or On
Hi Experts,

I am extracting data from SQL Server 2005 to flat file destination. I am using SQL Command to specify the data selection query. One of my query uses Replicate function to derive a column value. When I execute this package it fails with the error "Data conversion failed. The data conversion for column "value" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page".

The reason for the problem is that, it is takingthe InputColumnWidth of the flat file destination as 8000 and I specified the OutputColumnWidth as 4.

If I change the OutputColumnWidth to 8000, it is working without any error but resulting in the column width of 8000.

I tried using DerivedColumn Transformation's Type cast and DataConversion Transformation but still I am getting the same error in the respective Transformation components.

Can anyone suggest how to solve this issue.

View Replies !   View Related
Table Data File
Hi,
How to make the diffrent data files for different table in a database (SQL SERVER 2K)? By default it is the single data file and log file for the data base. But I wnat the separate data files for all my table in the database. So, any one can help me out in this regard......................???

View Replies !   View Related
Create CSV File From A Data Table
 Hi,     I am working on SQL Server 2005 Express and what i want to do is to created a CSV file from a database Table or a View......I search around and find that I Can use BCP for that purpose..Ne other good idea if you people suggest....as BCP is not working on my PC while i am connected to database server...So plz suggest me the right way to do so...  thanx 

View Replies !   View Related
Table Data Export To .sql File.
Rookie qustion here quys,
Using SQL Sever 2005 Express and Visual Web Devoloper Express.
I'm trying to get data from my local SQL sever database to my shared hosting database. SImple enough but...
1.) GoDaddy does not allow remote connections to the DB server
2.) With GoDaddy you can't just upload an .MDF file to your remote directory and script a connection string. You have to reference the DB server. Can't upload DB file to DB server.
As a work around, I've seen several .sql files that have all the T-SQL that will create a database and tables then insert the data. I've google'd extensively and searched several forums with no luck as to how to export my local data to file. I could then copy and paste into an online utility GoDaddys has to insert the data.
Is there a relatively easy way to export table data to a .sql file??? When I try using SQL Server Management Studio Express and "Scipt Table As> Insert To> File", It just gives me something like the following...
INSERT INTO [pubs].[dbo].[authors]           ([au_id]           ,[au_lname]           ,[au_fname]           ,[phone]           ,[address]           ,[city]           ,[state]           ,[zip]           ,[contract])     VALUES           (<au_id, id,>           ,<au_lname, varchar(40),>           ,<au_fname, varchar(20),>           ,<phone, char(12),>           ,<address, varchar(40),>           ,<city, varchar(20),>           ,<state, char(2),>           ,<zip, char(5),>           ,<contract, bit,>)
Plenty of data in this table, no data in script   ???
Can SQL Server Management Studio Express do what I wanting to do? If not, any suggestions? Know of a better hosing company?

View Replies !   View Related
Table Data Export Into An XML File
Hi,

I need to export data from some tables into an XML file format.

Any help please?

Thanks
John Jayaseelan

View Replies !   View Related
Importing Csv And XML Data From 1 File Into A Table
Hello - I am looking for a way to import data into a table where 1 of the fields holds an XML file but the rest of the fields hold basic csv data. We want to be able to set up a simple import script in our program so that a user can upload 1 file that contains both the data for the normal fields (example: last name, first name, date, source, etc) and the XML string that is parsed later on in our program. The entire XML string resides in its own field. I am wondering if there is anyway all of the data could be combined in 1 file. Thanks in advance.

View Replies !   View Related
Help For Importing CSV Data File To Table
Hi all-

I am in need of some help importing a .CSV file into a SQL Server 2005 Enterprise Edition.
The problem is I already implemented Bulk Insert task in SSIS but it is not importing any data. My detailed layout is as follows :
In SSIS package1 -
In Control Flow Bulk Insert Task has been inserted
Properties of Bulk Insert Task:
Connection adtc009d.ganny
Destination Table ganny.dbo.t4
Format
Format Specify
Row Delimiter {CR}
Column Delimiter Comma{,}
Source Connection
File r.csv
Options
Options Check Constraints
Maxerrors 20

This bulk insert task is connected to Data flow task, if we click edit to data flow task, data flow section will come, here Flat file source & OLE DB Destination is there. Flat file source is connected to OLE DB Destination.

Properties of Flat File
Connection Manager
Flat file connection Manager
here by clicking new link flat file properties to this.
Preview
by clicking preview all data are visible
Properties of OLE DB Destination editor
Oledb connection manager adtc009d.ganny
Data access mode: Table or View - fast load
Name of Table or view dbo.t4

After designing all this then if I start debugging I could able to get records are imported to a table.
Please suggest me where I am going wrong.

Thanks in advance
Karna

View Replies !   View Related
File Conversion - DTS
Is there a way to convert an excel file as an tab delimited text file before start importing using DTS or otherwise ?

Could some one know what steps involved here ?

Thanks for your help.

-Ivan

View Replies !   View Related
File Conversion
Hello I have a cvs that i manual convert to a xls file. I have created a SSIS package. I was wondering is there a script or tool that will automatic convert the cvs file to a xls file when i run the package. Other wise i will have to convert all the files manual to xls.

View Replies !   View Related
Sql Conversion From Bak File
i have a BAK file that was created from M S S Q L 7. how can i open or convert that file to a different format?

what i'm trying to do is: take an existing database with its contents and then save it in a different file format to be used in a different database.

i'm trying to use Case Studio
http://www.casestudio.com/enu/products.aspx

any help?

View Replies !   View Related
Table Data In Which Data File
Dear All,

I have SQL Server 2000.

I have one database which have 3 data files datafile1.MDF, datafile2.ndf, datafile3.ndf.

Now if i want to get list of tables in each datafile how can i get it ?

Thanks & Regards,
Nikunj

View Replies !   View Related
Move Data From Excel File To A Table (MS SQL)
I have an application , user will read information in Excel file and insert that data into my application, I think it spend a lot of time. I want to make a tool which move data from Excel file to a table in My application (MS SQL) automaticly. How to do it, anybody has tool or know how to do, pls help me.thanks.

View Replies !   View Related
Access File/Get Data Can't Attach To A SQL Table.
In Access 97, I am trying to attach to a table in my SQL Server 2000db.I use File/Get Data, which displays all the SQL tables including theone I can't attach to. (I can attach to all the other SQL tables.)But, when I select that table I get a message that tells me the nameis invalid. I don't understand this because it gives me the name inthe Get Data dialog, and I don't have to enter it manually.Any ideas?Thanks,Bob C.

View Replies !   View Related
Export Data From Table To Text File
I need to export data from a table to a text file, where the data in the table is deleted after written to the file. It is simple using DTS, but I want to do the export in "chunks" of data, committing the delete say after every 1000 rows.

My thought was a stored procedure would be easy enough to do this (done these in Oracle many times), but I don't know the quickest way to export a row of data from a stored procedure to a text file. Isn't using a command-line shell too slow? What are my options?

View Replies !   View Related
Data Formate When DTS Table To Excel File
I tried to dts a table to an excel file. The data types of all the columns in the table are varchar. I also want the data in the destination excel file to be text, so I didn't change the data format in the dts package. But after ran the dts, every value of every cell of the excel file has a single quote before it (not in the cell itself, but in the value shown space right below the toolbar). I tried to dts the table into a excel template which I predefined all cells to be text type. But some of the columns do not have the single quote anymore, while others still keep them. Since the other system that going to process the excel file does not expect the single quote, the process always fails.

Would anybody tell me how to get rid of the single quote?
Thanks a lot.

Qing

View Replies !   View Related
Insert Data From A Text File Into The Table
Hi. my websever mysql manager allows to Insert data from a text file into the table.
currently i have a table with the following fields.

email name country

so i wanto insers data from a text file into this table.
so my question is : how the text file format should be prepared.

i.e. the first record would be > xxxx@yahoo.com john us

View Replies !   View Related
Pulling Data From Flat File To A Table
I need to do some advanced formatting in the text file, because the data in the text file is bit complex. I have some knowledge of using BCP, BULK INSERT and bit about FORMAT FILES but I want to do some advanced formatting(using IF condition and all) to pull the data from text file.
Can anyone please tell me how can I perform bit advanced formatting using BULK INSERT?

Cheers

View Replies !   View Related
How To Redirect The Flat File's Data Into Another Table ?

If the system not able to convert the data from one data type(string,int) to another data type then i need to move the reocord into my error_table.

How to redirect the bad data into another table, while extracting the flat file data ?

Bad Data means if the system not able to convert the data from one data type to another data type.

Say X2R322? data cant convert as DATE data type but "070899" can be converted as DATE data type.

Thank you very much.


View Replies !   View Related
Inserting Data From Text File To SQL ME Table
Hello,

I have an application taht requires the use of a table. The device that this application works on, has a local memory that does not allow me to insert the 800,000 records that I need. Therefore I have two approaches:

1. To insert less records into my local memory database e.g 40,000 but not row by row, bulk insert is better. How do I do the bulk insert?

2. This is the most prefferable way: To find a way to insert all 800,000 records into a table on the storage card which is 1GB. What do you suggest? Will using threads be helpfull? Any ideas?

I use C# from VS 2005, SQL ME, compact framework 2.0 and windows 4.2.

Thanks in advance,

John.

View Replies !   View Related
Data Conversion From String To Decimal When Saving Data To SQL Server 2005 Using An ADO Recordset
Hello,

I am wondering what conversion rules apply, when a string, which contains a number, is saved to a SQL Server 2005 into a column of type decimal.

This is the code Im using (C++):

CString cValue = "0.75"
_variant_t vtFieldValue;
vtFieldValue = _variant_t(cValue)
pRecordSet->Fields->Item["MyColumn"]->Value = vtFieldValue;

"pRecordSet" is an ADO recordset. The database column "MyColumn" is of type "decimal(19,10)".

The most important question for me is, if the regional settings of the database server or the regional settings of the client PC are considered during the conversion from the string to the decimal value. For example in standard French regional settings the "." would not be recognized as decimal separator.

I am also wondering if the language of the database instance, in which this data is saved, is considered during this conversion or any other settings of this database instance.

So my general question is: Does anybody know exactly what rules apply during the above mentioned conversion?

Thank you for your help.

Regards,
Volker


View Replies !   View Related
Datetime Conversion From Csv File
I have a DTS-package running which imports data from a .csv file to a sql2000 database.
In the file there are some datefields in dd/mm/yyyy format and i want to keep it that way. But after the import the dateformat is yyyy/mm/dd.
Does anybody know how i can prevent this from happening?

Thanks in advance

View Replies !   View Related
Looking For SQL To Import Asii File Data Into Vendors Table
I have tried  my file name vendor_insertFromFile2.sqlBULK INSERT  (dbo.vendors VendorName, Street, City, Region, Country, PostalCode, Telephone, PortalId, Fax, Email, Website, CreatedDate, Unit, LastName, Cell) from 'D:AccessNAICSxPortal0_SampleData.txt'error messageServer: Msg 170, Level 15, State 1, Line 2Line 2: Incorrect syntax near '('.Data in the "CompanyName","Address","City","State","country","fullzip","FullPhone","Portal","Fullfax","Email","URL","date","ID","Contact_1","800No""DAVID STRAWN","460 FLOWERING TRL","GRAYSON","GA","United States","30017?,"770-277-8709",0,"“,"bkroom@bellsouth.net","WWW.BACKROOM4MEN.COM","09/02/05",1,"DAVID STRAWN","BRADRUSS","3353 S MAIN ST STE 130","SALT LAKE CITY","UT","United States","84115?,"801-975-0374",0,"“,"rusbrad@msn.com","WWW.BADANDNASTY.COM","09/02/05",2,"BRAD JENSEN",Thanks in advance on what is wrong or a link with working examples

View Replies !   View Related
Bulk Insert Into Table With More Columns Than Data Within File
Hey all

I have a bulk insert situation that would be nice to be able to pull off. I have a flat file with 46 columns that are to go into a table. The table, I want to have a 47th column to be updated later on by means of a stored proc saying if the import into the system was sucessful or not. I have the rowterminator set as '"' thinking that would tell SQL to begin on the next row, leaving the importstatus column null but i still receive an error.

First of all, is this idea possible within this insert statement. Secondly, if so, what would be the syntax to tell the insert statement to skip that particular column. It is the last column listed in the table so it just needs to start on the next row after it inserts the last bit of data in the flatfile.

If this is not possible, is it possible to bulk insert into a temp table?

Thanks

View Replies !   View Related
How Can I Export/import Data On Table To/from Text File
I needs export data on table to text file so I can process this data
with another database engine ie. Informix.

Can anybody help me to solve this problem ?

View Replies !   View Related
Convert .txt File With Ebcdic Data Type To SQL Table Via DTS
A text file can be imported to SQL table through DTS service, however all the fields with Ebcdic data type can't be converted. I know that I must need to to include a VBScript function with this DTS process to convert those fields. The following Foxpro function works fine in converting Ebcdic data type to a decimal type, as I now do a two step process to accomplish this task. Since I'm new in VB world, how can you create this function in VBScript and include it within DTS process?

function DblNum
************************************************** **********************
* Convert from a DBL number string into a regular number
************************************************** **********************
parameter string,decimal
*
dime decpos(4)
decpos(1) = 10
decpos(2) = 100
decpos(3) = 1000
decpos(4) = 10000
*
string = trim(string)
slen = len(string)
sign = 1
if !empty(string)
if !isdigit(substr(string,slen,1))
string = left(string,slen-1) + chr(asc(right(string,1)) - asc('p') + asc('0'))
sign = -1
endif
endif
if Decimal # 0
return sign*val(string)/decpos(decimal)
else
return sign*val(string)
endif

View Replies !   View Related
Export Data From SQL Database Table To Text File
Hi,

I'm trying to export data from one of the table in my SQL 7.0 database into text file. Can someone tell me how can i do this using SQL Query instead of using BCP (command line) ?? Thank you in advance.

View Replies !   View Related
Read Data From Text File And Insert To Sql Table
hi my friends
i want read data from text file,and write to my table in sql,
please help me

M.O.H.I.N

View Replies !   View Related
Write Data From A SQL Server Table Into An Excel File
Hi,



I need to export data from a table of SQL server 2000 database, into an Excel 2000 sheet. I tried following query from the sql query analyzer




Code SnippetSELECT * INTO [Excel 4.0;Database=F:ew.xls].[sheet1] FROM tab1





It gave me following error




Code SnippetServer: Msg 2760, Level 16, State 1, Line 1
Specified owner name 'Excel 4.0;Database=F:ew.xls' either does not exist or you do not have permission to use it.




The F:ew.xls file is present and it has no additional security applied, hence I think it should be writable.



Please tell me where am I doing wrong.

I don't know if this is the correct news group or not. Let me know if I have to post to some other news group.


- Abhijit



View Replies !   View Related
Flat File Data Types - Defined From Table?
This question is around how we can get the data types and lengths populated into the flat file source columns.



In Connection Manager, you have your flat file defined. You can choose "Suggest Types...", and the minimum lengths and correct data types will be returned from within the data in the flat file.



Is there some way to automate this data type definition, but coming from the other direction (coming from the destination table that we are loading)?



For example, you have mapped the columns that will be loaded. Can you then reverse engineer the data types and lengths for the columns in the flat file from the destination table?



TIA

View Replies !   View Related
How To Import Data Using Bcp Without A Format File Or Table Layout
I have several bcp output files I need to import into tables. I do not have format files for them. As far as I know they are in native format. I do not know the layout of the destination table they would populate.

1) how can I determine from the bcp file itself the schema of the destination table? Once I know that I should be able to import the data into the table.

Thanks

View Replies !   View Related
Conversion Of Columns Of A Table Into Rows Of Another Table
Hi folks,

I having some problem. I am having one column with n values in it, i want it to store as a row in another table. How to do it ???

Any help will be higly appreciated...

Thanks and Rgds
VJ

View Replies !   View Related
Data Conversion Failed Due To Potential Loss Of Data


Hi,

I am getting this error when my ssis package is running

Data Conversion failed due to Potential Loss of data

the input column is in string format and output is in sql server bigint

the error is occuring when there is an empty string in the input. what should i do to overcome this

It is an ID field and should i convert to bigint or should i leave it as char datatype is it i a good solution or is there a way to over come this.

View Replies !   View Related
HELP,,Imports A Data From Excel File Into A Table In SQLserver Database
Dear all,,
I need your help,,I'm work in website project using ASP.NET,,I have to register the users of this site,, the users are over 200,,so,,I'm thinking in away to save my time,,All the information of these users are stored in Excel file,,What I want to do is to imports these data from the excel file into a table in my database(SQLserver database),,Could you help in coding by VB.NETThanks in advance,,

View Replies !   View Related
Read Data From A Csv File And Insert It In A Sql Server Databse Table
Hai Everbody,
           for me in my project i want to read data from a csv file and insert it in a sql server databse table.The csv file may contain n number of columns,but i want only certain columns from that, and insert it in the database table.How to achieve this. Plz help me it is urgent. Thanks in advance.
        Thanks and regards
               Biju.S.G

View Replies !   View Related
How To Write Selected Table Data To A Text File Daily?
I want to check a table to see what rows have been updated today, then write to a text file some data from the selected rows; then I want to automate this (DTS package? TSQL stored procedure job?) to run every night at midnight. Is the DTS Wizard the best way, that's what I did, but have not confirmed that it is writing a new text file every day, and does each new version write over the old one?

View Replies !   View Related
Export Data From Sql Server 2005 Table To Text File


Hii
I want to transfer data from table to a text file.I m trying to use bcp utility and xp_cmdshell.but the export is not successful.
My query is:

EXEC master..xp_cmdshell'bcp "Select * from test..emp" queryout "c:dept.txt" -c -T -x'

and its output is:

NULL
Starting copy...
NULL
3 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.) Total : 16 Average : (187.50 rows per sec.)
NULL


but there is no row copied into c:dept.txt

where is the problem??

Thanx
-Supriya

View Replies !   View Related

Copyright 2005-08 www.BigResource.com, All rights reserved