Home > database >  Questions about pl/SQL query to write
Questions about pl/SQL query to write

Time:10-04

Now there is a table, only focus on one of the coil (30), record the time (hours and minutes on, interval for 5 minutes), three flow field, I need the output flow rate table to CSV file, transverse for daily 288 for five minutes, the vertical axis for different coil, which is 288 x 30 on a table, query the how to write the results to what I want form form?
Again a little bit greedy, I want to form output 365 days a year, is there any way you can cycle through the query final output flow table every day?
A novice, I hope the great god said a little bit in detail, thank you very much!

CodePudding user response:

The origin of your data look like? The result is what kind of expectations do you have? Some test data are given

CodePudding user response:

To study the dbms_sql package
Combining with the utl_file, probably can meet your requirements

CodePudding user response:

reference 1st floor wmxcn2000 response:
your origin data look like? The result is what kind of expectations do you have? Gives some test data
is the first column coil, the second column is the recording time, the second column is the traffic,
this is what I want form,

CodePudding user response:

 select coil, wm_concat (record), sum (traffic) from table group by coil 

CodePudding user response:

 select coil, wm_concat (record), sum (traffic) from table group by coil 

CodePudding user response:

The demand of the transfer line column?
288 decode?
Turn to baidu, the building Lord, should meet your requirements
  • Related