question

red68 avatar image
red68 asked

Can you use a CASE STMT that LIMITS a WHEN?

For example, set segment = 1 only for 100 of the eligible records. Let the other remaining records be eligible for other segments in following when statements

oracle
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Oleg avatar image Oleg commented ·
Fancy to elaborate a bit? If you are asking on whether it is possible to update just a part of eligible records then you can add the where rownum <=100 predicate in Oracle, similarly to the old, claimed to be deprecated, but still working set rowcount = someNumber in SQL Server T-SQL (just don't forget to reset it back to 0 meaning unlimited when done).
0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.