Forgot your password?
typodupeerror
User Journal

Journal: Fun with SQL Server 2012 11

Journal by Marxist Hacker 42

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

SELECT @strOut =Coalesce(@strOut +',','')+ ISNULL('[' +
MP.ModelPointName + '] int', 'ErrorInFactoryModel int')
FROM (SELECT TOP 800 ModelPointName, Sequence
      FROM dbo.GetReferencedModelPointsByJobID(@JobID)
      ORDER BY Sequence) MP
WHERE NOT (MP.ModelPointName LIKE '%Ship%'
        OR MP.ModelPointName LIKE '%Scrap%')

PRINT @strOut

SET @strOut=NULL

SELECT @strOut =Coalesce(@strOut +',','')+ ISNULL('[' +
MP.ModelPointName + '] int', 'ErrorInFactoryModel int')
FROM dbo.GetReferencedModelPointsByJobID(@JobID) MP
WHERE NOT (MP.ModelPointName LIKE '%Ship%'
        OR MP.ModelPointName LIKE '%Scrap%')
      ORDER BY Sequence

PRINT @strOut

The 2nd one returns a single field name, the first, returns all the field names.

User Journal

Journal: Acheivement unlocked: the moderation trifecta!

Journal by damn_registrars
To the best of my knowledge this is the first time I've pulled this off - up moderations of insightful, informative, and interesting all on the same comment.

Amusing that because of slashdot's shitheaded fuzzy math it says it was moderated Insightful 40% of the time and the other two 30% each even though each was done once as of this moment (yes I know that is an ancient bug here but still worth pointing out how epically stupid it is).
User Journal

Journal: Trying to remember a conspiracy theory 7

Journal by Marxist Hacker 42

Back in the early 1990s, when CD Roms were first invented, on major use of them was for the conspiracy dial up bulletin board system. With a CD Rom online on your bulletin board, you could "host" a CD full of downloadable text files on everything from government cover-ups to UFOs.

I was into such things at the time, and read many of these files.

Fast forward to today- and Pope Francis gives us a conspiracy theory: that rich first world nations are promoting war in the third world as a prop to economics. All over the first world Catholic blogosphere, there is outrage- how dare the Pope tell us capitalism is supported by warfare?

Of course, Dwight Eisenhower, upon leaving the U.S. Presidency said the same thing,- warned us about the military industrial complex.

But I seem to remember a "secret" document passed around those old BBSs from the Vietnam Era that basically said the same thing, only actually recommending it as a policy. Does anybody else remember this document? Can you remember something I can google on? I'm coming up empty.

User Journal

Journal: private enterprise discouraged 5

Journal by Bill Dog

From some FA on the Hobby Lobby ruling:

"But the government points to a long line of cases holding that for-profit companies may not use religion as a basis for failing to comply with generally applicable laws."

Earlier this month we learned that the FAA decrees that it's legal to use drones for fun, but not for profit.

Why do I lose rights in America simply by virtue of trying to make money on my own time, or with my own association with others?

User Journal

Journal: Oligarchy sucks 8

Journal by smitty_one_each
Good article:

When our current President was elected, many progressives saw the dawning of a new epoch, a more egalitarian and more just Age of Obama. Instead we have witnessed the emergence of the Age of Oligarchy.
The outlines of this new epoch are clear in numerous ways. There is the diminished role for small business, greater concentration of financial assets, and a troubling decline in home ownership. On a cultural level, there is a general malaise about the prospect for upward mobility for future generations.

Read the whole thing.
I know there are some on here who like to equate this oligarchy with "conservative" politics, though I disagree with that entirely.
Past all that, though, what matters is what we're going to DO about it.
If Mississippi teaches us anything, I submit that http://conventionofstates.com/ is the way to go. Forget DC, and its Progressive overlords.

Republicans

Journal: Conservative court makes conservative rulings 10

Journal by damn_registrars
The two rulings are not a big surprise considering who is on the bench. The downstream repercussions of the Hobby Lobby ruling will be interesting to see played out, however.

In particular, if no insurance company wants to offer a plan that excludes every imaginable type of "contraception", then what would happen? Will Hobby Lobby take them to court to force them to offer a plan that meets their particular belief system?
User Journal

Journal: Why capitalism works 66

Journal by smitty_one_each

A better model of the human condition:

The case for free enterprise, for competition, is that it's the only system that will keep the capitalists from having too much power. There's the old saying, "If you want to catch a thief, set a thief to catch him." The virtue of free enterprise capitalism is that it sets one businessman against another and it's a most effective device for control.

Anybody who buys the con that "government" == "virtue" is a fool.

"I'm not a god, I was misquoted." -- Lister, Red Dwarf

Working...