data-conversion

Converting CSV File to XML in Java

Is there an existing application or library in Java which will allow me to take CSV data and create an XML file? The XML tags would be provided through maybe the first row containing column headings....

Avoiding TSQL Data-conversion errors

I think this is best asked in the form of a simple example. The following chunk of SQL causes a "DB-Library Error:20049 Severity:4 Message:Data-conversion resulted in overflow" message, but how come? declare @a numeric(18,6), @b numeric(18,6), @c numeric(18,6) select @a = 1.000000, @b = 1.000000, @c = 1.000000 select @a/(@b/@c) go H...

What is the best way to programatically convert a word document with a table structure to XML

So, I have this word document that has a whole bunch of tables some of which are pretty long. It spans many many pages in some cases. I need to programmatically convert this thing to XML. I was initially told we could just copy paste into Excel and save it as a CSV, then I could convert from there which would be pretty easy. Howeve...

Matching records based on Person Name

Are there any tools or methods that can be used for matching by a person's name between two different data sources? The systems have no other common information and the names have been entered differently in many cases. Examples of non-exact matches: King Jr., Martin Luther = King, Martin (exclude suffix) Erving, Dr. J. = Erving, J. ...

How to replace all non-sequential GUIDs with sequential ones?

I have a brown-field SQL Server 2005 database that uses standard, unsorted GUIDs as the majority of the primary keys values and also in clustered indexes (which is bad for performance). How should I go about changing these to sequential GUIDs? One of the challenges would be to replace all of the foreign key values as I change each the ...

Oracle: Migrating a col. with values, nulls and 0s

I'm migrating data from one db to another. I have a numeric col. that contains some values, some 0s and some nulls. My gut feeling is to convert all the 0s to NULLs. This will store an optional, user-provided number. Any reason NOT to convert all the 0s to NULLs? ...

SQL Server: EDI to XML Data Conversion

I need to do the data conversion from EDI format to XML. is there any step by step tutorial, links about what are the processes on data conversion? How to convert from EDI to XML, step by step guide? I highly appreciate your help. Thanks ...

SQL Server converting a variable varchar field to money/decimal/something with decimal places

I'm looking for an elegant way to convert a field of type varchar, with variable data in it, to a data type which can be used for mathematical operations sample data from the field (excluding quotes) '' 'abc' '23' '23.2' The method should work for all, and for the first & second values should return 0, and not throw an SQL Server err...

Reading Paradox Database files

I'm working with a client who has an existing system, built on what is apparently a Paradox database. I've got the database, in the form of a zip file containing .DB, .MB and .PX files, one for each table. I need to take (some) of this data and import it in to a Web application that's using MySQL. Does anybody have a way for me to ext...

SQL server data conversion using Microsoft Sync Framework

We are analyzing Microsoft Sync Framework for syncing the client and server database. The scenario is like this: Server DB hold master data for all projects but the client DB only contains data to a specific project. Moreover the schema of client and server database is also different. However the data is easily convertible. Is there a...

c++ server htons to java ntohs client conversion

Hi I am creating a small TFTP client server app where server is developed using c++ and client using java. Here i am sending "block count" value using htons conversion. But i am not able to convert it back to its original value at client. for example if am sending block count ntohs(01) (2 bytes) from se...

How to output IEEE-754 format integer as a float

I have a unsigned long integer value which represents a float using IEEE-754 format. What is the quickest way of printing it out as a float in C++? I know one way, but am wondering if there is a convenient utility in C++ that would be better. Example of the way that I know is: union { unsigned long ul; float f; } u; u.ul = 10...

Desining a system for mutiple input/multiple output

Background I'm sketching on an application that needs to perform something like this database a >--| |--> fileformat 1 database b >--+--> custom application >--+--> fileformat 2 ... | | ... database n >--| |--> fileformat n The databases in questi...

Fast conversion from YUY2 to RGB24

Hello there! I'm writing a program, that will do some transformations with image from a webcam in real-time. As almost all other webcams, my noname gives data in YUY2 format (as written in bmiHeader.biCompression). I tried straight conversion on CPU side according to http://www.fourcc.org/yuv.php#YUY2, but it is VERY slow and wrong :). ...

how to work with strings and integers as bit strings in python?

Hello! I'm developing a Genetic Algorithm in python were chromosomes are composed of strings and integers. To apply the genetic operations, I want to convert these groups of integers and strings into bit strings. For example, if one chromosome is: ["Hello", 4, "anotherString"] I'd like it to become something like: 010010010010100101...

Any one aware of what format the OLD IBM PTS (personal typing system) used

I have been trying to write a program to convert my father's old PTS. I assumed it was standard EBCDIC but when I convert to ASCII I get mostly junk. Any one have any knowledge about PTS? ...

Using antlr and the DLR together -- AST conversion

I have an AST generated via ANTLR, and I need to convert it to a DLR-compatible one (Expression Trees). However, it would seem that i can't use tree pattern matchers for this as expression trees need their subtrees at instantiation (which i can't get). What solution would be best for me to use? ...

Convert 4 bytes to int

I'm reading a binary file like this: InputStream in = new FileInputStream( file ); byte[] buffer = new byte[1024]; while( ( in.read(buffer ) > -1 ) { int a = // ??? } What I want to do it to read up to 4 bytes and create a int value from those but, I don't know how to do it. I kind of feel like I have to grab 4 bytes at a time,...

how to save excel file in MS SQL Server 2005

I have a table in which there are two columns : 1. import type, 2. Excel import template. The second column - "Excel import template" should store the whole excel file. How would I save excel file in databse...can I use binary datatype column, convert excel file to bytes and save the same ? Thanks in advance ! ...

Problem convert column values from VARCHAR(n) to DECIMAL

I have a SQL Server 2000 database with a column of type VARCHAR(255). All the data is either NULL, or numeric data with up to two points of precision (e.g. '11.85'). I tried to run the following T-SQL query but received the error 'Error converting data type varchar to numeric' SELECT CAST([MyColumn] AS DECIMAL) FROM [MyTable]; I tried...