Viewing 14 posts - 1 through 14 (of 14 total)
sometimes the prettier solutions perform far worse
unfortunately SQL Server cares not one jot for the aesthetics of your code
August 9, 2011 at 8:55 am
My comment in agreement with what GilaMonster has said, is to be very carful do do proper performance and scale testing if you decide to use table variables, they can...
August 9, 2011 at 4:02 am
I appreciate that this thread is quite old so for forgive me for resurrrecting it.
this is great...
I like Eric Mamet's xml solution best - thanks Eric. it has let me...
May 5, 2011 at 8:30 am
Seomething like This.
(Please note that I havn't tested this and it might need tweaking).
SELECT CODE, TYPE, CLASS, EFFECTIVE_DATE, PRICE, CATEGORY, PRICE, MARKED_UP_PRICE
FROM (
SELECT CODE, TYPE, CLASS, EFFECTIVE_DATE, PRICE,...
April 15, 2011 at 7:23 am
While adding a new field in the designing tool, we can add it in a position wherever we want
This is what it looks like, but behind the scenes the designer...
April 14, 2011 at 10:01 am
You can do this in SSMS.
Right click on your table and select Design, you can then drag your column to the position you want it.
In order to do this...
April 14, 2011 at 9:00 am
thanks Gail, you beet me to it. I found the same.
April 14, 2011 at 3:33 am
In fact,
I have done my experiment and found that SQL won't allow you to alter the column that has an index referencing it, you must drop the index first....
April 14, 2011 at 3:32 am
Yes, but when you do this the optimizer has to do a scan over the index rather than a seek.
This got me thinking overnight...
What happens to the index when...
April 14, 2011 at 3:20 am
Ah yes, I see.
I had read an example where indexes of different collations were used on a column, but on revisisting this example I can see that the second index...
April 13, 2011 at 10:05 am
Alternatively
If you realy can't know the structure of the temp table in advance, allow it to be created dynamically and use the ROW_NUMBER() function to apply an artificial key that...
April 8, 2011 at 10:42 am
Great stuff.
Just make sure you test thoughly for edge cases, performance etc.
Ben
April 8, 2011 at 6:00 am
Hi.
This table valued function will parse the contents of the secName field replacing you escape sequences with the desired character...
CREATE FUNCTION [dbo].[fn_DecodeDiacriticalMarks]
(
@EncodedString NVARCHAR(450)
)
RETURNS @DecodedMarks TABLE
(
decoded NVARCHAR(450)
)
AS
BEGIN
DECLARE...
April 8, 2011 at 4:44 am
I would suggest writing a second query to get the summary data for the current year and UNION them together
March 31, 2011 at 6:33 am
Viewing 14 posts - 1 through 14 (of 14 total)