Viewing 15 posts - 6,241 through 6,255 (of 15,381 total)
jcb (11/19/2013)
just for the record: avoid triggers, they are evil.
avoid to put business logic in the database, let...
November 19, 2013 at 1:11 pm
John Hanrahan (11/19/2013)
Here's the relevant code:
...
Maybe my question should be isn't @@rowcount always one 1 in a trigger? You can see they use @numrows to do error checking?...
November 19, 2013 at 12:55 pm
John Hanrahan (11/19/2013)
This code is used to determine if a row was inserted into the table....
November 19, 2013 at 12:45 pm
boeledi (11/19/2013)
Therefore, in case of error, I will need to test the...
November 19, 2013 at 9:55 am
waxb18 (11/19/2013)
Essentially all i want to be able to do is use these tables to tell the story so to speak based on their dates and Journey ID.
So for journey...
November 19, 2013 at 9:32 am
Something like this?
begin try
begin transaction
--Insert Child (Mary)
DECLARE @Mgr hierarchyid
DECLARE @LastEmp hierarchyid
SELECT @Mgr = [HierarchyID] FROM hierarchies WHERE employeename = 'Nick'
SELECT @LastEmp = Max([HierarchyID].ToString()) FROM hierarchies WHERE [HierarchyID].GetAncestor(1) = @Mgr
INSERT INTO...
November 19, 2013 at 9:24 am
No it's cool. I would suggest though that you test this stuff before you post it. There were loads of errors. This is the script after I combined them into...
November 19, 2013 at 9:08 am
Save yourself months of anguish and use the hierarchyid datatype. This is essentially what you are trying to recreate on your own.
November 19, 2013 at 8:46 am
We all have those things we can't change and often they are the most frustrating. Hopefully you at least realize how awful of a design that is and don't do...
November 19, 2013 at 8:43 am
waxb18 (11/19/2013)
I will do my best to get together some scripts...
November 19, 2013 at 8:42 am
waxb18 (11/19/2013)
I have been tasked with creating a travel Itinerary, simple stuff....
however upon further investigation each part of a journey is stored in a different table each one with...
November 19, 2013 at 8:22 am
In order to help we will need a few things:
1. Sample DDL in the form of CREATE TABLE statements
2. Sample data in the form of INSERT INTO statements
3. Expected results...
November 19, 2013 at 8:15 am
And then it would be HIGHLY advisable to change your schema that you store dates in a date column instead of numeric. It will save you countless hours of pulling...
November 19, 2013 at 8:08 am
Revenant (11/18/2013)
Sean Lange (11/18/2013)
Revenant (11/18/2013)
I think I will start on a QotD demonstrating pivot at its (hopefully) best.I look forward to it.
I hope I will not disappoint you, Sean. My...
November 18, 2013 at 3:17 pm
There is nothing wrong with your ddl. I am guessing this is on the .NET side. What does the code look like?
November 18, 2013 at 3:16 pm
Viewing 15 posts - 6,241 through 6,255 (of 15,381 total)