I was doing a task this morning which will need to find the rate category a resource belongs to, each resource category has a rate and the resource has its own rate. what I need to do is use the individual rate to match the resource category's rate and find the nearest one.
the resourcecategoryBands table has the following fields: ResourceCategoryCode, Rate
after some thinking, I came up with the following solution:
select top 1 @ResourceCategoryCode = ResourceCategoryCode from ResourceCategoryBands where CategoryType = 'FEES' order by abs(Rate-@IndividualRate)
bingo!
Subscribe to:
Post Comments (Atom)
Disable Microsoft Defender for Cloud for Visual Studio Subscription (MSDN)
I use a visual studio pro subscription which comes with $150 azure cloud credit, for some reason Microsoft Defender for Cloud was turned on ...
-
Error 15401: Windows NT user or group '%s' not found. Check the name again. SELECT name FROM syslogins WHERE sid = SUSER_SID ('Y...
-
/etc/ipsec.config conn ios keyexchange=ikev1 authby=xauthrsasig xauth=server lef...
-
Finally, it is time. E4SE 811 and eBackoffice 736 will replace our current 810b/735a environment after staying so many years. Just got the n...
No comments:
Post a Comment