Comment Re:Haven't done T-SQL in years (Score 1) 11
I thought the table valued function call was already doing that, but that does point to an answer- perhaps it's only fetching the one row before evaluating the concatenation.
I thought the table valued function call was already doing that, but that does point to an answer- perhaps it's only fetching the one row before evaluating the concatenation.
I didn't explain the behavior adequately.
SELECT * FROM dbo.GetReferencedModelPointsByJobID(@JobID)
Returns someplace between 2-56 rows, depending on JobID
The second query does NOT error out, but is not returning a comma delimited string of all rows, but instead, in some cases, is returning only ONE row.
Since I'm using this to build a temp table, it doesn't error out until I attempt to fill columns in the temp table that do not exist.
If Slashdot had posted a story about "the Lone Gunmen" pilot episode, then they would have a scoop that anticipated the 9/11 attacks with a civilian airliner, by several months...
Nah. Not HERE, in the land of the Free, with Rule of Law!
But?
We were right all the time. Unfettered by doctrine, dogma of allegiances, wary of our own cognitive bias, we saw what we saw.
Bitter vindication.
That I'm running a risk with the first of > 800 Model Points, but in my database, I never exceed 80 modelpoints for a given job ID.
But I still don't understand why the subquery is necessary (in some cases).
I have a Table Valued Function that returns a simple parameterized view. I want to turn that view into a string.
Can anybody tell me why the first query works and the second one doesn't?
DECLARE @JobID INT
DECLARE @strOut VARCHAR(MAX)
SET @JobID=2861
To this day, males 18+ must register. Those who do not cannot receive Federal financial aid, nor work as a GS or contract employee for the Fed.
Did it do a 4G inverted dive?
Fungus among us.
He preached Torah?
Harrumph. He makes vague statements about Law, in writings committed 60 years after his crucifixion.
Sermon on the Mount is what he taught.
Always draw your curves, then plot your reading.