troubleshooting Question


Avatar of sam15
sam15 asked on
Oracle Database
19 Comments1 Solution294 ViewsLast Modified:
What is the best way to set different colors for every row generated by a CURSOR in PL/SQL.

The colors are for HTML table rows. I basically do
<tr bgcolor="blue">-->Row 1
<tr bgcolor="red">---->Row 2

My 1st reqt is to do different color every row on one webpage.

My 2nd reqt is to do different color for every group of rows whenever a book number changes on anotehr webpage.
For example, if book No. 1000 has 3 rows it will have one color and the next set of rows for following book No. 1001 will have a different color.

I was thinking of adding a counter in the CURSOR and using MOD() function to decide on color for the first case. For 2nd case it seems the code needs to check current book value with previous book value to set the color.

Any ideas or best practice for this.

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 19 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 19 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros