Author |
Message |
Blazewada
Celebrity Bewarse Username: Blazewada
Post Number: 8100 Registered: 08-2008 Posted From: 218.186.8.238
Rating: N/A Votes: 0 (Vote!) | Posted on Monday, March 15, 2010 - 7:19 am: |
|
Codes:aa code production code aa ?
illio, local testing code. Real Bewarse
|
Codes
Bewarse Legend Username: Codes
Post Number: 53896 Registered: 05-2006 Posted From: 212.60.115.186
Rating: N/A Votes: 0 (Vote!) | Posted on Monday, March 15, 2010 - 5:47 am: |
|
aa code production code aa ? An investment in knowledge always pays the best interest
|
Blazewada
Celebrity Bewarse Username: Blazewada
Post Number: 8094 Registered: 08-2008 Posted From: 202.124.30.8
Rating: N/A Votes: 0 (Vote!) | Posted on Monday, March 15, 2010 - 1:11 am: |
|
hey manager i got a open source package to generate csv file with java beans. its damn easy . http://supercsv.sourceforge.net/index.html - Now i have 2 things to do - generate sql results as csv file and update remote sserver - get csv file as output from service. play with the data, update the data in list of java beans and then generate a ew csv file . Real Bewarse
|
Blazewada
Celebrity Bewarse Username: Blazewada
Post Number: 8093 Registered: 08-2008 Posted From: 202.124.30.8
Rating: N/A Votes: 0 (Vote!) | Posted on Monday, March 15, 2010 - 12:51 am: |
|
420:Baa you connected to the wrong side on the icon .. my icon was more of expression "Am I right or wrong ."
oh, nenu aavesapaddanu. apologies manager. ur solution is correct. here my requirement is different. its like treating csv as a database and doing operation in a new csv file using insert statements. any ways thanks for ur updated solution regarding insert statements.
Real Bewarse
|
420
Celebrity Bewarse Username: 420
Post Number: 9393 Registered: 12-2006 Posted From: 85.150.252.173
Rating: N/A Votes: 0 (Vote!) | Posted on Monday, March 15, 2010 - 12:49 am: |
|
baaa .. for your request .. , in one our projects .. I had advised a developer in my team to use CSV as an external tables .. you can connect CSV's in Oracle , SQl server etc .. and for end user .. its just an other table and you can rape the data with ur SQL statements ..
Knit India,do not split India !
|
420
Celebrity Bewarse Username: 420
Post Number: 9392 Registered: 12-2006 Posted From: 85.150.252.173
Rating: N/A Votes: 0 (Vote!) | Posted on Monday, March 15, 2010 - 12:45 am: |
|
Blazewada: deeniki antha etakarame miti baa, configuration in server elago adiga teliyaka. whenever i go to any desi and ask any doubt in my earlier employers, they used to look at me and talk to me thnking as if i am a dumb guy. typical desi mentality.
Baa you connected to the wrong side of the icon .. my icon was more of expression "Am I right or wrong ."
Knit India,do not split India !
|
Blazewada
Celebrity Bewarse Username: Blazewada
Post Number: 8091 Registered: 08-2008 Posted From: 202.124.30.8
Rating: N/A Votes: 0 (Vote!) | Posted on Monday, March 15, 2010 - 12:28 am: |
|
420:
deeniki antha etakarame miti baa, configuration in server elago adiga teliyaka. whenever i go to any desi and ask any doubt in my earlier employers, they used to look at me and talk to me thnking as if i am a dumb guy. typical desi mentality.
Real Bewarse
|
Blazewada
Celebrity Bewarse Username: Blazewada
Post Number: 8090 Registered: 08-2008 Posted From: 202.124.30.8
Rating: N/A Votes: 0 (Vote!) | Posted on Monday, March 15, 2010 - 12:27 am: |
|
420:Baaa ..whats is the database ? Oracle or SqlServer ?
its not a database, basically we get the csv file as output from a service, and we need to read csv fie, operate some formula on columns in csv file, generate a new csv file wit the result and new headers. a normal java program can do, instead i am treating it as a database and doing the operations using sql statements Real Bewarse
|
420
Celebrity Bewarse Username: 420
Post Number: 9391 Registered: 12-2006 Posted From: 85.150.252.173
Rating: N/A Votes: 0 (Vote!) | Posted on Monday, March 15, 2010 - 12:18 am: |
|
Baaa ..whats is the database ? Oracle or SqlServer ? on the server , write a sql script .. that fetchs and spools data as txt file into a CSV... SQL statement = where clause (filtering) .. sum , average .. = aggregate functions ..
Knit India,do not split India !
|
Blazewada
Celebrity Bewarse Username: Blazewada
Post Number: 8089 Registered: 08-2008 Posted From: 202.124.30.8
Rating: N/A Votes: 0 (Vote!) | Posted on Sunday, March 14, 2010 - 11:47 pm: |
|
data: empname empid group area country salary emp1 66543 IT yishun singapore 2000 emp2 66544 IT aMK singapore 3000 emp3 66545 Sales pasirris singapore 4000 emp4 66546 Admin khatib singapore 5000 emp5 66547 finance raffles singapore 6000 Real Bewarse
|
Blazewada
Celebrity Bewarse Username: Blazewada
Post Number: 8088 Registered: 08-2008 Posted From: 202.124.30.8
Rating: N/A Votes: 0 (Vote!) | Posted on Sunday, March 14, 2010 - 11:46 pm: |
|
as of now local lo ila data retrieve chestunna. import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.Statement; public class ExcelReadTest{ public static void main(String[] args){ Connection connection = null; try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection( "jdbc:odbc:exceltest" ); Statement st = con.createStatement(); ResultSet rs = st.executeQuery("Select distinct(group),SUM(salary) from [Sheet1$] group by group" ); ResultSet rs1; ResultSetMetaData rsmd = rs.getMetaData(); int numberOfColumns = rsmd.getColumnCount(); while (rs.next()) { for (int i = 1; i <= numberOfColumns; i++) { if (i > 1) System.out.print(", "); String columnValue = rs.getString(i); System.out.print(columnValue); } System.out.println(""); } st.close(); con.close(); } catch(Exception ex) { System.err.print("Exception: "); System.err.println(ex.getMessage()); } } } Real Bewarse
|
Blazewada
Celebrity Bewarse Username: Blazewada
Post Number: 8087 Registered: 08-2008 Posted From: 202.124.30.8
Rating: N/A Votes: 0 (Vote!) | Posted on Sunday, March 14, 2010 - 11:45 pm: |
|
Naaku oka requirement undi, excel work sheet lo unna colums meeda filter chesi, aggregate function apply cheyali. as f now pallnning to load excel sheet as a database using jsbc:odbc:excel driver. naa local machine lo aithey excel work book select cheskoni dani point chestunna, server lo deenni configure ela cheyyali? remote location lo file update ayyettu chesi danni reference kinda teeskovali. adi ela configure chestaru? danni batch job kinda configure cheyyali. paina requiremrnt ki suggestions please. Real Bewarse
|