注意:将数据提取为CSV格式 [英] Reg: Extracting the data to CSV format
问题描述
Hello Everyone
一个快速直接的问题:我需要一个C / C ++程序从数据库中提取数据,输出应该是CSV逗号分隔值。格式。
简单地说:我将获得一个数据库,我的工作是从整个数据库中提取特定数据,并获得CSV格式的输出。给我的数据库有24个表,我需要从任何一个表中提取数据,如果按下运行按钮,我应该直接以CSV格式输出。
编程我拥有的:我所拥有的程序只是为了得到每个表的细节---
Hello Everyone
A quick and direct question: I need a C/C++ program to extract the data from the database and the output should be in CSV "Comma Separated Value" format.
Briefly: I will be given a database and my work is to extract a particular data from that whole database and should get a output in CSV format. The database given to me has 24 tables and I need to extract data from any one of the table and if I press the run button I should get the output directly in CSV format.
Program what I have: The program what I have is just to get the details of each table---
推荐答案
你有没有具体问题?
......你是否收到了构建错误?
...程序是否出现故障?
Do you have a specific question?
... Are you getting a build error?
... Is the program malfunctioning?
谢谢回复
给定的亲克正在运行,甚至我正在为此获得输出。但我的问题是如何从上面的程序中提取数据,输出应该是CSV格式。
ie如果我运行上面的程序,输出是来自mydatabase和我的进程和表的列表需要从任何表中提取所需的数据,这样如果我按下运行按钮,我应该直接获得CSV输出....这就是我需要的
Thanks for the reply
The given program is running and even I am getting output for that. but my question is how to extract the data from the above program and the output should be in CSV format.
i.e. If I run the above program the output is the list of processes and tables from mydatabase and I need to extract required data from any of the tables so that if I press the Run button I should directly get CSV output....This is what I need
看起来你正在使用标签分开你的数据?您需要将这些标签更改为逗号。输出到文件很容易。然后,您可以轻松地将printf'重定向到打印到文件,而不是使用类似
Looks like you are using tabs to separate your data? You''d need to change those tabs into commas. Outputting to a file is easy. You can then easily redirect your printf''s to print to a file instead using something like
这篇关于注意:将数据提取为CSV格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!