72
How proficient do you rate yourself in your most coded language?
(sh.itjust.works)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
I have advice that you didn't ask for at all!
SQL's declarative ordering annoys me too. In most languages you order things based on when you want them to happen, SQL doesn't work like that- you need to order query dyntax based on where that bit goes according to the rules of SQL. It's meant to aid readability, some people like it a lot,but for me it's just a bunch of extra rules to remember.
Anyway, for nested expressions, I think CTEs make stuff a lot easier, and SQL query optimisers mean you probably shouldn't have to worry about performance.
I.e. instead of:
you can do this:
Especially when things are a little gnarly with lots of nested CTEs, this style makes stuff a tonne easier to reason with.
I'm 100% going to try this, but I have a feeling that it isn't going to work in my application. Salesforce Marketing Cloud uses some pared-down old version of Transact-SQL and about half of the functions you'd expect to work just flat out don't.
The joys of using a Salesforce product.
Oh boy, have fun! CTEs have pretty wide support, so you might be in luck (well at least in that respect, in all other cases you're still using saleforce amd my commiserations are with you)
Salesforce just gives me the other kind of CTE.