Viewing 15 posts - 2,656 through 2,670 (of 6,036 total)
rpatil22 (2/4/2009)
and which is fastest method for transfering same data to other table instead of deleting it?inserting is taking lot of time.
1. Create FOR DELETE trigger on your table to...
_____________
Code for TallyGenerator
February 8, 2009 at 5:03 pm
Then you need to exactly what they ask.
1st, figure out highest rate for each book:
(Select MAX(Rating) as TopRating, BookId
from dbo.BooksRatings
group by BookId ) A
2nd, you need to retrieve all records...
_____________
Code for TallyGenerator
February 4, 2009 at 11:03 pm
Bruce W Cassidy (2/2/2009)
[font="Verdana"]But if you keep it around as a permanent table within your database, you will find it useful. [/font]
I'd suggest ot have it in a separate...
_____________
Code for TallyGenerator
February 2, 2009 at 5:16 pm
CONVERT(VARCHAR(8), DATEADD(ss, 12345, 0) ,114) will cut off milliseconds.
_____________
Code for TallyGenerator
February 2, 2009 at 12:37 pm
If use such scenarios why pay so big money for SQL Server licenses?
Flat files will work as good.
_____________
Code for TallyGenerator
February 2, 2009 at 12:26 pm
26 seconds for work out 2 mil rows???
There must be no indexes, no keys...
_____________
Code for TallyGenerator
January 31, 2009 at 4:18 am
Actually NOT EXISTS typically performs not worse than LEFT JOIN and in some cases it beats LEFT JOIN quite significantly.
That's why I use NOT EXISTS as a standard.
_____________
Code for TallyGenerator
January 29, 2009 at 12:54 pm
DATEADD(dd, DATEDIFF(dd, 0, GETDATE() ), 0)
It remains datetime, but without time portion.
_____________
Code for TallyGenerator
January 28, 2009 at 2:23 am
"as Combined_Notes" to be removed
_____________
Code for TallyGenerator
January 27, 2009 at 11:46 pm
It depends on your definition of result set.
_____________
Code for TallyGenerator
January 27, 2009 at 11:43 pm
declare @cn as varchar(2000)
select @cn = notes + char(13) + char(10) + resolution as Combined_Notes
...
_____________
Code for TallyGenerator
January 27, 2009 at 5:32 pm
Delete from My_Sales_Table
Is it some kind of staging table?
Then consider to use temp table or - even better - table variable.
It will eliminate distributed transaction.
As for static table - consider...
_____________
Code for TallyGenerator
January 27, 2009 at 1:11 pm
Hi Sergei,
1st, you probably posted on wrong forum: sys.tables works for SQL2005, not SQL2000.
2nd, constraints happen to be not only primary.
_____________
Code for TallyGenerator
January 27, 2009 at 12:30 pm
LEFT JOIN TBL_ANCHOR_EVENT
_____________
Code for TallyGenerator
January 26, 2009 at 7:09 pm
SELECT 0 AS ID, -1 AS PARENT_ID, ROOT AS NAME
UNION ALL
SELECT ID, ISNULL(PARENT_ID, 0), NAME
FROM TableName
It's good you have no power to alter the existing table.
Its structure is better...
_____________
Code for TallyGenerator
January 26, 2009 at 4:36 pm
Viewing 15 posts - 2,656 through 2,670 (of 6,036 total)