October 13, 2019 at 4:08 am
Hi,
As part of development task I have to write a SQL logic for the below 6 scenarios, I have achieved desired result in my query using Case Statement but I want to know is there any other options(ways) where I can write query without using Case Statements to achieve the same result using sub-query or window function?
Table 1 - This table will have User Account Type & Subscription Amount
Table 2 - This table will have User Information.
Note: I'm not is allowed to share my script from this computer. Sorry for that.
___
Known Is An Drop,Unknown Is An Ocean....
Njoy Programming
October 14, 2019 at 4:10 am
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
October 14, 2019 at 9:43 am
Why do you want to avoid using a case expression? Why are you not allowed to share the script?
Seriously, if you're asking for help with what appears to be a homework question with no DDL, sample data or expected results, and you can't show us what you've already tried, then I think you're going to draw a blank.
John
October 18, 2019 at 12:05 am
I have come up with the perfect solution for you. It is really quick, and doesn't use case statements, and does everything you want.
Unfortunately, I am not allowed to share that script from this computer. Sorry for that.
But trust me, its really good.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy