Viewing 15 posts - 961 through 975 (of 1,554 total)
I didn't mention dynamic SQL, simply because it isn't 'an easy' way...
But, to gather an opinion of oneself, please go to http://www.sommarskog.se/ and read the article entitled "The curse...
August 10, 2005 at 7:12 am
Like this?
SELECT DISTINCT
Thread.URL,
W.Word
FROM PThread Thread
JOIN PPostWord PostWord
ON Thread.ID = PostWord.ThreadID
AND Thread.URL = 'www.foo.com'
JOIN PWord W
ON W.ID = PostWord.WordID
JOIN WordList List
ON W.Word = List.SearchWord
/Kenneth
August 10, 2005 at 7:01 am
I don't see how openrowset would help in this case..?
(-- edit --)
Here's a great article from Erland that outlines the possibilites at hand..
How to share data between stored procedures.
/Kenneth
August 10, 2005 at 6:55 am
What does your queryplan say? It's the best way to start looking to see what is different between the two..
/Kenneth
August 10, 2005 at 6:51 am
Seems to me a bit like a case of wanting to eat the cake and still have it.
On one hand, the proc's in question should return a resultset to the...
August 10, 2005 at 6:47 am
Ah, now I understand the problem (duh)
Don't use double quotes around strings, use single quotes. This is the most bulletproof solution, since then...
August 9, 2005 at 10:52 am
No, you can't reference objects dynamically that way.
/Kenneth
August 9, 2005 at 8:41 am
AFAIK, nope.
BOL states the max identifier length as 128 characters. Can't go beyond that.
/Kenneth
August 9, 2005 at 8:38 am
You are aware that this query would return a row with 1000 (one thousand) columns...?
..it's.. pretty wide...
/Kenneth
August 9, 2005 at 7:42 am
Did you miss the 'with recovery' along with 'stopat'?
RESTORE LOG MyNwind
FROM MyNwind_log1
WITH RECOVERY, STOPAT = 'Jul 1, 1998 10:00...
August 9, 2005 at 7:39 am
Here's a way to consolidate the aggregates into one query by using CASE.
SELECT t.CurDate,
CASE @option
WHEN 1 THEN SUM(t.Value)
WHEN 2 THEN AVG(t.Value)
END
FROM table1 t
WHERE <...complex whereclause...>
GROUP BY t.CurDate
This...
August 9, 2005 at 7:13 am
Victor, please repost your question by creating a new thread - this thread deals with another question entirely. It will be very confusing with two discussions in one thread.
August 9, 2005 at 6:17 am
Here's a sample from BOL: (you want to use the STOPAT clause)
-- Restore the database backup.
RESTORE DATABASE MyNwind
FROM MyNwind_1, MyNwind_2
WITH NORECOVERY
GO
RESTORE LOG MyNwind
FROM MyNwind_log1
WITH...
August 9, 2005 at 6:00 am
Not knowing any details of your system, but.. No, it's not "harmless" to disable a constraint on a production table, especially if activity is still going on.
On the other...
August 9, 2005 at 5:54 am
Lastly, just an explanation of the subquery errormessage...
As it was written, the subquery would return all passwords for all rows where it found matching id's between the two tables - and...
July 6, 2005 at 8:54 am
Viewing 15 posts - 961 through 975 (of 1,554 total)