Question: Single query or multiple queries

Hi All,

I am developing a web-based application for my friend for a process that uses an Excel sheet currently.

I have attached the Excel sheet for reference.
I have created the database structure as under:

entity
-eno
-ename

check
-eno_fk
-cno
-check_text
-check_field1
-check_field2
-check_field3
-check_field4
-istitle

steps
-cno_fk
-stepno
-steptext

obs
-stepno_fk
-obsno
-obstext
-obsdate

eff
-cno_fk
-effect
-edate

I want to know the optimal way of writing a query to display the excel sheet structure in the web-based application.

I have written a query, but for each “step” the “check_text” is repeated.
I need help in how to query in a way such that I can display the exact structure of the excel sheet.

Hope somebody can help!!
Other tips are welcome too :slight_smile:

Thanks and Regards
Sam

you’re not going to get multiple values in a single cell easily

better to return a “flat” result set from the query (one value per column, no blank columns), which will include duplication of check data for all steps in a check, and then post-process with your application language (php or whatever) when looping over the result rows

Thanks “r937” for replying and sorry for being so late.

The final method that I have used is to have multiple queries and some processing in the application as also suggested by you.