Viewing 15 posts - 1 through 15 (of 24 total)
Another solution could be to use a table object instead of a temporary table.
It looks like their default collation is the database collation.
In my example :
DECLARE @TempCollation TABLE (Field1 nvarchar(50)...
March 26, 2008 at 7:03 am
Why would other databases prevent you from changing the server's default collation ?? Those other databases will still keep whatever collation they already have.
Yes! they will, but what...
March 19, 2008 at 7:42 am
Ian and PSA
I think you are missing the point here...or am I 🙂
If your database and temDB collation differ you have to either rebuild the masterDB or create your temptables...
March 19, 2008 at 4:08 am
Patrick Duflot (3/17/2008)
CREATE PROCEDURE [dbo].[TestCollation]AS
BEGIN
CREATE TABLE #TempCollation (
Field1 nvarchar(50) NOT NULL)
INSERT INTO #TempCollation
SELECT Field1 FROM Table1
SELECT Field1 FROM #TempCollation
UNION
SELECT Field1 FROM Table1
END
Try to change your CREATE TABLE clause to...
CREATE TABLE...
March 18, 2008 at 2:52 am
Adam Haines (2/20/2008)
...Jonnie for performance reason we should not use the in clause. Since your function is returning a table the option for best performance is to do an...
February 20, 2008 at 7:25 am
meichner (2/20/2008)
February 20, 2008 at 7:17 am
meichner (2/19/2008)
At this point I am not sure if I am better off using dynamic sql or using optional parameters in my t-sql script. Any thoughts?Thanks
You should not use...
February 20, 2008 at 5:12 am
Maybe it's too much work to change your queries but one option is to create your temp tables first...
--if you do like this...
Select name into #tmp from Person
--you can change...
February 20, 2008 at 3:44 am
Jonnie Pettersson (2/13/2008)
if you implemented this...
AND Con.Periodenddate <= (SELECT TOP 1 PeriodEndDate FROM
(SELECT TOP 2 ConsultantID, AchieveLevel,
...
February 13, 2008 at 1:56 pm
Now I'm lost 😉
if you implemented this...
AND Con.Periodenddate <= (SELECT TOP 1 PeriodEndDate FROM
(SELECT TOP 2 ConsultantID, AchieveLevel,
Max(PeriodEndDate) AS...
February 13, 2008 at 1:45 pm
Hmm, I'm not sure what you are doing in the main sproc but as I see it, you have to left join with more columns...
LEFT Outer JOIN #Temp r ON...
February 13, 2008 at 12:58 pm
alorenzini (2/13/2008)
.... repromote in #Temp that if it is a CurrentLevel to suppress the 'X' in the Repflag column.
Have you tried the code in my earlier post? Didn't it work?
February 13, 2008 at 12:22 pm
Not much info but... http://support.microsoft.com/default.aspx/kb/235340
Quoted from Microsoft
"The SQL Server OLEDB provider (SQLOLEDB) has a new behavior designed to provide more accurate information to the caller about what happened...
February 13, 2008 at 4:53 am
Insert...
SET NOCOUNT ON
after the AS clause in your stored procedure (in the beginning)...
A recordset can contain meny recordsets...and your subquery will be the first recordset and the data...
February 13, 2008 at 3:48 am
Adam Haines (2/12/2008)
Not quite, if the repromote is the currentlevel then don't display. The script works but it is still not suppressing the repromote is at the current level.
--if the...
February 13, 2008 at 2:05 am
Viewing 15 posts - 1 through 15 (of 24 total)