Viewing 15 posts - 4,546 through 4,560 (of 14,953 total)
"CASE" doesn't quite work that way.
It can have one of two formats. The first is a "simple case".
CASE [Value or Column]
When [Value or Column] Then [Value or Column]
......
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 22, 2011 at 1:47 pm
Ray K (3/22/2011)
Absence (as in mine from SSC -- have I missed anything?)
Just me trying to bring Chlorine Trifluoride to an Amonium Nitrate fight. 🙂
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 22, 2011 at 1:34 pm
The reason it has to work on "boundaries" instead of day multiples or something like that is simple to demonstrate:
How many months are there between Feb 5 and Mar 5,...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 22, 2011 at 1:33 pm
You might get what you need if you include column 48 in the trace event.
http://msdn.microsoft.com/en-us/library/ms186265.aspx has the data on what events can be traced, and what columns are available for...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 22, 2011 at 1:16 pm
Here's where your trigger is breaking:
select @pk = column_name
from INFORMATION_SCHEMA.KEY_COLUMN_USAGE
where TABLE_NAME = 'demo'
select @pkey = @pk from inserted
What that does is assign the column name to the @pk...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 22, 2011 at 1:08 pm
Just splitting them up will usually give some performance increase, since it will reduce locks and contention. Maybe not enough, though.
Even in that scenario, the design of the main...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 22, 2011 at 12:16 pm
I'm not clear on what you need.
Can you provide the table definition you are querying?
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 22, 2011 at 12:13 pm
Why does this look like class homework to me?
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 22, 2011 at 12:12 pm
With the values you've given, LEFT() would do what you ask for.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 22, 2011 at 11:09 am
Lowell (3/22/2011)
Auto commit has been turned off.
1- William logs into the database
2- Julianna logs into the database
3- William sees 12 rows in the TOYS table...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 22, 2011 at 11:02 am
The problem is that you have this in your Anchor:
WHERE ManagerID IS NULL
That means it will only get people who don't have a manager. Then, your recursive portion tries...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 22, 2011 at 11:00 am
42
What's the question?
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 22, 2011 at 10:57 am
Peter Trast (3/17/2011)
Tom.Thomson (3/17/2011)
Peter Trast (3/17/2011)
Peter Trast (3/17/2011)
Daniel Bowlin (3/17/2011)
CirquedeSQLeil (3/17/2011)
crookj (3/17/2011)
Ray K (3/16/2011)
CirquedeSQLeil (3/16/2011)
squareroot
Canal :crying:
Joe
Novocain
Nitrous Oxide
Arsenic Trioxide
Dinitrogen Tetroxide N2O4
Ammonium Nitrate NH4NO3
BOOOOOOOOMMM!!!!!!!!!!!!
Bah! I'll see your Amonium Nitrate and...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 22, 2011 at 10:55 am
Steve Jones - SSC Editor (3/21/2011)
Wind, and too much of it.
Hey, Mr. Taggart, how about some more beans!
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 22, 2011 at 10:51 am
Use the "inserted" table in the trigger.
I'd have to actually see what you have for your trigger to suggest anything more concrete than that.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 22, 2011 at 10:50 am
Viewing 15 posts - 4,546 through 4,560 (of 14,953 total)