Results 1 to 2 of 2
- 06-21-2011, 04:43 PM #1
Senior Member
- Join Date
- May 2010
- Posts
- 113
- Rep Power
- 0
How to create a header from an sql select query in java
Hi
I have to create a header line from a select query and put it in an output file following the records from the query.
For example ,
the query looks like this:-
select name,room_no,cc1200,cc1201,cc1202,cc1203,cc1204,cc 1205 from student;
The header should look like this
name,room_no,00,01,02,03,04,05
I only need idea of what to use to get the header i want
once i have the query , is it good idea to use token with delimiter , (is this idea a good one)
or using split function is a good idea ?
The query returns records which will be put into a file, all these records should preceed with a header with the column names changed to name,room_no,00,01,02,03,04,05 ?
How do i split the query till " FROM " word , so that i can get only the column names .
Thank You In AdvanceLast edited by renu; 06-21-2011 at 08:10 PM.
- 06-21-2011, 04:55 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,604
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
Java DAO create query please help
By alvin0618 in forum XMLReplies: 5Last Post: 03-31-2011, 07:05 AM -
return output from a non select query (java/access)
By kitiaradl in forum New To JavaReplies: 2Last Post: 04-21-2010, 12:04 AM -
return output from a non select query (java/access)
By kitiaradl in forum New To JavaReplies: 0Last Post: 04-15-2010, 09:01 PM -
SELECT FROM WHERE query
By herfnai in forum JDBCReplies: 3Last Post: 11-24-2008, 11:04 AM -
Using a variable in a SELECT FROM WHERE query
By cplmckenzie in forum JDBCReplies: 12Last Post: 04-23-2008, 03:24 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks