I have a program that combines the contents of other tables into one tables.
If it sees any bad data from each table, it stores it into the tables called errors:
So the inputs like this:
table1,table2,t able3
the output:
combinedTable, errorTable1,err orTable2,errorT able3. The bad data from table1 will go to errortable1, etc.
My question is How to check to see if some of the error table is empty?...
User Profile
Collapse
-
Need Help on How to check if the excel table is empty
-
Read Ms word document line by line
Hi all,
I am new to VB. I have a Word document. Could you show me some idea of how to
1) Read line by line
2) Get the word next to a specific one. For example as below:
So for 2) , how do I get Some Name from Name:, Some address from Addr:, and Some City from City: ?Code:Name: Some Name Addr: Some address City: Some City. Description: some texts, etc.
Thanks. -
STR_TO_DATE Problem
Hi All,
Please test it out.
[CODE=mysql]SELECT STR_TO_DATE('01/01/69','%m/%d/%y');[/CODE]
I got this result:
2069-01-01
Please help to make it to 1969-01-01. Thanks -
[CODE=mysql]select instructor ,count(instruct or) from ThisTable group by instructor;[/CODE]
I think it will work. My mine was dump yesterday. Thanks....Leave a comment:
-
Sorry for the misspell, since it is not real files. I do have the java files spelling correctly. In fact, I was able to run the project using the eclipse. But I have trouble
setting up to work with the command line. Thanks any way.Leave a comment:
-
How to Query more than one Col1 in Col2?
Hi all,
I have a table with two columns called for example instructor and class
one instructor may teach more than one class. How can I query how many classes each instructor teaches?
Let me make up the table.
Instructor Class
Mr. A physics
Mr. A Calculus
Ms.B... -
Compile doesn't see the derived class
Hi All,
I have an abstract class,called Mybase.java, for example. I have a derived class called MyDerived.java that extends Mybase.java.
From the window command line, I compile the Mybase.java successfully, as it should be. When I compile Myderived.java I got the error:
C:\test\Myderiv ed.java:3: cannot fsymbol: class Mybase
public class Myderived extends Mybase
Please give me some... -
I didn't get the comma either. I will try some thing like:
char c = inputLine.charA t(i);
if (!Character.isW hitespace(c))
{
field.append(c) ;
}
and append the coma when it reaches the whitespace.
Thanks for your help.
Brian...Leave a comment:
-
Jos,
Code: ( java )
1.
field= field.toString( ).replaceAll("[\t"], ",");
I got an error message: field is StringBuider type while field.toString is String type. If I use field.toString( )= field.toString( ).replaceAll("[\t"], ",");
I got this error:
required: variable
found : value
field.toString( ) =...Leave a comment:
-
If I have a line with three field, each field may separate by a number of whitespace. some coma may be between one field. For example, the field name:company, which may be like this: companyname, Inc. So it I see something like this, I will put double quote arount it. So it would be "companynam e, Inc". And each field of the input file is separated at least three whitespace. Here is the example:
lastname firstname...Leave a comment:
-
Please take a look at the code and the input/output files and help me find out what I have been doing wrong here. The regular expression didn't work. The line feed didn't seem to work either. Thanks
import java.io.*;
import java.util.*;
public class TestReplaceAll
{
public static void main(String[] args) throws Exception
{
/* sample file:
12345 ...Leave a comment:
-
I use the regular expression as you mentioned and I didn't get the comma in.
Also, I don't know how to handle the whitespace and the ',' between the text field. Take this input file for example:
col1 col2 col3
12345 text text someone, sometitle
If I use replaceAll space with , then I would end up with
12345,text,text ,someone,someti tle....Leave a comment:
-
[PHP]"[/PHP]
r035198x, sorry about that.
I just fix the version problem and using the FileWriter as you suggested. But I didn't get the right output format. Here is my input file:
12345 sometext sometext
99 sometext sometext
And the output is :
12345,sometext, sometext
sometext,99,som etext,sometext
Please show me how to get it right like...Leave a comment:
-
Hi Admin,
Here is what I did:
import java.io.*;
import java.util.*;
public class TestReplaceAll
{
public static void main(String[] args) throws Exception
{
BufferedReader in = new BufferedReader( new FileReader("sam ple.txt"));
PrintWriter out = new PrintWriter("ou t.txt");
String...Leave a comment:
-
Hi Admin,
I know how to read the file using FileReader/BufferedReader. But I have the problem with the logic of how to add comma and replace the whitespaces between each fields. Please if you can write a simple code so that I can learn from it. I appreciate it very much....Leave a comment:
-
Formatting output file
Hi all,
I am very new to java programming. I want to write a program that turn an input file into the output file with fields separated by comma. Here is the sample input:
12345 somewords somewords somewords
21345 somewords somewords somewords
Below is the output I want to have:
12345,somewords ,somewords,"som ewords
21345,somewords ,somewords,some words...
No activity results to display
Show More
Leave a comment: