Viewing 15 posts - 2,716 through 2,730 (of 5,504 total)
jaffrey (10/16/2010)
Of course, there will be slightly more effort if foreign keys, constraints, triggers and the like will be involved....
So far the query works fine as long as the constraints,triggers,procedures...
October 16, 2010 at 8:47 am
I would use the "quirky update" method.
Disclaimer:
DO NOT USE the code
until you've read Jeff's article[/url] and the related discussion.
DO NOT USE the code
until you...
October 16, 2010 at 5:28 am
Lowell (10/16/2010)
jaffrey (10/16/2010)
Hai guys,Is it possible, Delete a record without using Delete keyword?
a single record? no...the TRUNCATE TABLE [TABLENAME] command will delete all records in a table. so that deletes...
October 16, 2010 at 4:45 am
WayneS (10/15/2010)
Michael Valentine Jones (10/15/2010)
Do tables that reference table konten have indexes on their foreign key columns?
Specifically, Do ALL tables that reference table konten have indexes on their foreign key...
October 15, 2010 at 5:35 pm
Do you have to store it on the disk?
Why not storing the xml results in a separate table (file name in one column, xml data in a xml column, one...
October 15, 2010 at 4:11 pm
Did you try the WITH ROLLUP operator?
If that doesn't help you, please provide table def and some sample data together wit your expected result so we have something to test...
October 15, 2010 at 4:05 pm
Would you mind telling us your expected result based on your sample data?
It's probably a lot easier to understand than your current description...
October 15, 2010 at 12:04 pm
Ok, here's the recursive CTE with a triangular join:
Side note: I changed my version slightly to cover different values for holeid.
If you compare the performance you'll see that the quirky...
October 15, 2010 at 11:30 am
You're not using SQL2000, are you? (fingers crossed)
If you're still at SQL 2000, it'll require "slightly more work".
One option is to use a stored procedure that calls itself. An example...
October 15, 2010 at 2:14 am
Here's what I came up with:
-- sample data setup
DECLARE @tbl TABLE
(
HOLEID VARCHAR(30),
DFROM DEC(8,2),
DTO DEC(8,2)
)
INSERT INTO @tbl
SELECT 'TEST', 104.45 , 110.43 UNION ALL
SELECT 'TEST',...
October 14, 2010 at 6:07 pm
Something like this?
;
WITH CTE (id, Parent_ID, [LEVEL]) -- recursive CTE
AS
(
SELECT h.id, h.Parent_ID, 0 AS LEVEL -- get all id's
FROM History h
UNION ALL
...
October 14, 2010 at 5:13 pm
bitbucket-25253 (10/14/2010)
Is Mr Celko mellowing? Admitting there is something he does NOT know, or has his character drastically changed?http://www.sqlservercentral.com/Forums/Topic1002440-1292-2.aspx
Question: How many false statements can you find in his reply?...
October 14, 2010 at 12:59 pm
Alvin Ramard (10/14/2010)
Alvin Ramard (10/14/2010)
Good idea Jason. Where can I find a wife before Xmas? 😀I'm guessing buying my own might be cheaper. 😀
E-book or wife?
There are places...
October 14, 2010 at 12:48 pm
As usual: It depends. 😀
There is simply not enough information available.
For instance:
Do you need to preserve order of operations?
In what frequency do you receive new messages (each SEND...
October 14, 2010 at 7:38 am
You might want to have a look at the CrossTab article referenced in my signature to see an alternative to PIVOT.
I find it easier to remember and it seems to...
October 5, 2010 at 3:36 pm
Viewing 15 posts - 2,716 through 2,730 (of 5,504 total)