0

I have a table structured like so:

10 columns named report1 -> report10, a childName column, and parentId column. I need to upload a url to one of the report columns dynamically. So when I hit the upload on my front end, it sends a request to the backend, which I need to say, return data from table where the childName = the passed childName. Easy enough, I have this:

var viewStudents = "select * from reportsfor where CHILDNAME = '" + studentName + "'";

but where my issue lies, is the fact that I need to now figure out DYNAMICALLY if report1 is filled already, if report2 is ready, so on. I don't think I can do this from after I query the db this way, so i assume i need another query, or is there a way i can alter the query to do so?

Hopefully this makes sense!

3
  • is there any way to check if report is filled already in database ?
    – Amit Verma
    Jun 26, 2021 at 2:53
  • Sample data and desired results would really help. Also, DB2 and MySQL are very different databases. Tag only with the database you are really using. Jun 26, 2021 at 11:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.