« first day (3753 days earlier)      last day (1099 days later) » 

1:24 AM
Would the greatest function ever written really be limited to 254 parameters though
 
@JamesLupolt It matters not what data you put in the database; the greatest data will come out if you invoke the greatest function
 
 
5 hours later…
6:24 AM
Morning
 
 
2 hours later…
8:18 AM
dedicated to @PaulWhite
 
8:34 AM
Morning
 
 
5 hours later…
1:23 PM
@ypercubeᵀᴹ the robots will leave us nothing!
 
Except soggy sandwiches, may be
 
@PaulWhite I'll be worried when they start eating sandwiches
 
don't give them ideas
even soggy ones
 
 
2 hours later…
3:14 PM
Is there a better way to throw errors than this in an ITVF?: stackoverflow.com/questions/1485034/…
 
 
1 hour later…
4:15 PM
No, and it is a bad idea.
Do something different.
 
4:30 PM
hi paul!
 
@PaulWhite Like what? Multi-statement TVF or scalar function?
The other options already rejected were to suppress all rows due to invalid parameters or to return rows but all with NULL value and error units. The particular use case is providing users capability to convert between different units of measurement from the base unit of measurement for a particular type of measurement in the data mart because they have a preference.
In our internal conversions, we already validate all the source and destination units, so the version of that function doesn't really need any error checking like that.
 
@CadeRoux "Like what" depends entirely on what it is you need to do, and the constraints you are operating under. I have no idea what they are; I'm just saying that trying to hack an error condition into an in-line table-valued function seems like one of the least-preferred options to me. I don't think I would ever do it.
 
In particular a common case where we cannot make the Data Mart on its own meet two conflicting needs, would be where pediatric measurement is preferred in mm, but adult is preferred in cm.
 
@swasheck hi!
@CadeRoux For example, I can imagine using a different type of module (stored procedure, multi-statement TVF etc.) or a wrapper of some kind, or returning an error code in an extra column, or...well, many other things I guess. Perhaps one concrete example in a question on the main site would be the way to go. It would, no doubt, be nice if functions were more, er, functional.
 
4:48 PM
@PaulWhite OK. TVFs are by far the most functional when we need to expose things in views because the ultimate consumers will have difficulty consuming and combining non-tabular data sources in things like Tableau and PowerBI.
 
They can't consume tabular results from stored procedures? Or can't call them?
Sounds like a deep-fried chicken problem.
 
@PaulWhite They really aren't easily used in data models.
 
15
Q: How to use SQL Server stored procedures in Microsoft PowerBI?

AsafSavichI want to generate reports from my SQL Server tables. I have some already made stored procedures that I would like to use to generate reports from. I haven't found a way to do so. Only by rewriting the queries. Thanks :)

 
The basic methodology to join to a SPs output is to put that data into a temp table.
Or you can use OPENQUERY like that example and just pull all the data back - weee!
 
Unless you're using Azure apparently
idk if that is still true
 
4:58 PM
Only Azure gets the GREATEST functionality
 
Heh!
 
@CadeRoux sounds like a certain former president named that function
 
It's fine, we're not sure we want to document and publicize that the users will now have this capability. We found a discrepancy in our system of an assumption that the units we were pulling from the source OLTP system were in the preferred unit so that we would not have to convert. Then we discovered that about 30% of them did need conversion, so we implemented conversion into the Data Mart so that people using it would have their preferred unit.
Along the way, we revealed that that is not uniformly accepted by all cardiologists (particularly differing in peds vs adult), but also by country.
Some things like the choice of symbol ml vs cc don't actually involve unit conversion, it's just nomenclature, but some like mm vs cm are unit conversion.
 
If the scope of our product went all the way to owning every dashboard in either Tableau/PowerBI or whatever, it wouldn't be an issue, because we could control everything, but since we want to expose things at the database level, it kinds of limits what we can do and how we can present it to their choice of tools.
 
5:04 PM
sounds like endless fun
for suitably small values of "fun"
 
/JEAGL
been gone for a while. was hoping for a slack-style bot to run a command
 
this room will always be reassuringly manual
 
It's fine. It's just trying to figure out what is best for them. If I return no rows or NULL rows because they CROSS APPLY or OUTER APPLY to convert with bad parameters, they will get a certain behavior, but if they get an error thrown, that's more likely to stop themselves shooting themselves in the foot.
 
@PaulWhite not into the automation party?
 
I like my sandwiches just as they are tyvm
Actual intelligence may be quite rare, but AI is no substitute
That said, I do ask my phone to name songs
 
5:17 PM
sniff sniff I smell fried chicken. Needs more spices and herbs
 
I heard in Japan they're 3d-printing their chickens
Secret spice cartridge #9 must be running empty
 
Summoning Bill by mentioning chicken worked!
Everyone gather round to hear his wise words
 
SSIS is good, secret recipe of 11 herbs and spices is better
 
Any moment now
 
Owls are best
 
5:24 PM
Just be patient
Sometimes the fryer takes a few minutes to heat up
 
Fryer is always hot. That's a rookie mistake I'd expect from a antipodean kangaroo hugger as yourself
 
I tend to assume that anything related to BI falls under your expertise.
Have you done anything like what Cade is describing?
 
Only BI things that end in a double L which can include the spanish LL because I'm such a masterful speaker
You expect me to add useful content? sheesh let me click links
 
I am an eternal optimist
With an infinite capacity for disappointment
 
That'll serve you well in our friendship
 
5:30 PM
Going well so far!
Our travel bubble with Australia should open soon.
I expect the lack of a border to lead to great hilarity.
Possibly with shopped images.
3
 
emus and kangaroos
 
 
2 hours later…
7:34 PM
@PaulWhite If the artificial column throwing the error is not requested in the SELECT, it gets optimized out, so yeah, not even enforceable to make them select that column.
 
 
1 hour later…
8:44 PM
English is a delightful language
 
9:02 PM
@billinkc lol
 

« first day (3753 days earlier)      last day (1099 days later) »