[Oracle] How Do I Insert Into A DB Depending On If A Checkbox Is Ticked Or Not

So I am currently doing a lil project and I’m a bit stumped one on part. Using Visual Studio and SQL Developer.

So lets say you want to add a golf course to a system. When you are setting it up there is an ID which is system set, a name that is user set and then a checkbox for the tee colours (Blue, White, Yellow, Red).

What I am trying to do is for every tee colour that is checked then 18 records are inserted into a CourseDetails file.

The way I am going to go about it is that if X is Checked then generate 18 records for that tee colour into the table with the ID and all the extra things set to 0 like yards etc.

Am I going about this the right way? Or is there something I am missing, I feel like there should be an easier way to do this but then again I am not very good I guess. So all this SQL things are within Visual Studio C# methods etc etc

If anyone has any advice or tips etc I’d be more than happy to give more info or whatever.

Cheers

submitted by /u/theNewOM
[link] [comments]


Go to Source of this post
Author Of this post: /u/theNewOM
Title Of post: [Oracle] How Do I Insert Into A DB Depending On If A Checkbox Is Ticked Or Not
Author Link: {authorlink}