how to select columns as rows?

后端 未结 5 1396
走了就别回头了
走了就别回头了 2020-12-06 17:53

So, I\'ve been searching around and I\'ve found things similar to my problem, but I need more help to get a real solution.

I\'m trying to construct a query that will

5条回答
  •  广开言路
    2020-12-06 18:09

    You aren't very clear about how you are presenting your report and what you are generating it with. Are you using direct results from the query tool to generate your "report"? In which case, methinks you are trying to pound a nail using a screwdriver. Use the right tool for the job.

    The SQL language, directly, shouldn't be used to setup your presentation data to generate your report. Really, it's a silly idea. The fact that you can write a report with straight-up SQL statements doesn't mean that you should.

    You really ought to generate your report using an application program that you write yourself, or a report generation tool like Crystal Reports.

    Application Program written by yourself: If you are using a cursor object to query the database, you can simply get the column names from that cursor object. Problem solved.

    Report Generation Tool: usually they provide a facility to represent the dynamic data that could appear.

    Either way, I think you need to rethink your approach to this.

提交回复
热议问题