Viewing 15 posts - 1,096 through 1,110 (of 2,894 total)
SQL_NuB (10/4/2012)
i'm not able to post data. the query is present.if its easy to accomplish, how can I accomplish it?
DDL of tables used (at least relevant part of it)?
What...
October 4, 2012 at 7:04 am
ChrisM@Work (10/4/2012)
No undocumented vapourtables, no sort:
SELECT n = a.n+b.n
FROM (VALUES(0),(10),(20),(30),(40),(50),(60),(70),(80),(90))b(n)
CROSS JOIN (VALUES(1),(2),(3),(4),(5),(6),(7),(8),(9),(10))a(n)
đŸ˜‰
No sort? I would suggest to add ORDER BY, otherwise order is not guaranteed, so you may populate 100...
October 4, 2012 at 6:57 am
Statistics?
Is large chunks of data in your PROD version were recently inserted/changed/removed?
October 4, 2012 at 6:53 am
Some thing like:
IF DB_NAME() != 'LogCentralDB'
BEGIN
INSERT INTO LogCentralDB.dbo.Counter_Matrix
SELECT * FROM dbo.Counter_Matrix
WHERE ...
END
Please note: LogCentralDB database name...
October 4, 2012 at 6:19 am
You can easily, but you need to read this first:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
October 4, 2012 at 6:13 am
maida_rh (10/4/2012)
E.g :
Select LTRating ,RHDate from Accounts...
October 4, 2012 at 5:32 am
Hi there!
There is another method without using ROW_NUMBER...OVER and undocumented table from master database (which can be changed or even dropped by MS without any notice http://blogs.msdn.com/b/suhde/archive/2009/04/05/invalid-object-name-master-dbo-spt-values-microsoft-sql-server-error-208.aspx;-)):
SELECT IDENTITY(INT,1,1) AS...
October 4, 2012 at 5:15 am
CELKO (10/2/2012)
...
NO! We hate UDFs; they are not declarative, do not optimize and stink of 1950's FORTRAN. SQL is declarative and uses tables! This is a huge change...
October 4, 2012 at 4:26 am
PiMané (10/3/2012)
Sean Lange (10/3/2012)
NO LIKE is not SARGable so you will get scans. It has to examine every row to determine if it is a match or not.
So a LIKE...
October 4, 2012 at 3:49 am
This discussion is bringing us back to the similar, quite heated one, we had not long ago.
Does a "Customer" have a "Natural Key"?
Customer Code? May be, but to...
October 4, 2012 at 3:41 am
Jeff Moden (10/3/2012)
bteraberry (10/3/2012)
People can write bad code in any language.
They certainly can. Why, I know this one guy that still uses a 1950's push stack and punch card...
October 4, 2012 at 1:01 am
ScottPletcher (10/3/2012)
...
Why would the relative position of the column make the slightest bit of difference at all?
It may effect page splits and re-writes.
October 3, 2012 at 1:04 pm
...
Given that a customer's name can change, perhaps it is an attribute of the purchase.
...
Given that nothing in the Universe is constant and everything can change, I would...
October 2, 2012 at 7:10 pm
ScottPletcher (10/2/2012)
sql-lover (10/2/2012)
bteraberry (10/2/2012)
ScottPletcher (10/2/2012)
Maybe I'm missing something.Why not just ALTER the column to be a bigint instead of an int?
He said these are very big tables. Altering the...
October 2, 2012 at 7:02 pm
ScottPletcher (10/2/2012)
Eugene Elutin (10/2/2012)
[
...
Is this statement true? If so is it better to use Guid or BIGINT?
It depends, but usually BIGINT is better.
Another question, related to keys... If a table...
October 2, 2012 at 6:49 pm
Viewing 15 posts - 1,096 through 1,110 (of 2,894 total)