Viewing 15 posts - 16 through 30 (of 36 total)
sql-lover (7/1/2014)
There is no difference between Unique Index and Unique Constraint, besides the obvious syntax of course.
I would disagree. They are mostly the same,yes, but you can use the INCLUDE...
July 1, 2014 at 8:25 am
Well of course the unused space is going to shrink, since the table is being rebuilt. After many inserts and updates, the table will get fragmented again and the unused...
June 30, 2014 at 4:49 am
SPNs (Server Principal Names) need to be generated for all servers involved. This can be automatic by giving the AD account that is used as the service account the...
December 17, 2013 at 9:50 am
Yes, that's the collation.
What a pain to change it. There has to be some way to get this done without changing it.
Any ideas on where the proc "sp_MScreate_distributor_tables" is located?...
November 21, 2013 at 7:43 am
I would agree with Lynn's post. You can not divide by zero, but if you divide by NULL, you'll get NULL.
DECLARE @i FLOAT = 10, @x FLOAT = 0
SELECT @i...
April 22, 2013 at 10:09 am
Gazareth (1/26/2012)
October 2, 2012 at 7:00 am
I have several SSIS packages that do this. As far as I know, the text file is created automatically if it does not exist.
If you want that first row...
August 24, 2012 at 10:31 am
To answer the immediate question, I would recommend partitioning. We have data warehouses for several clients, and this solution works great for us.
In my opinion, the bigger question is why...
August 20, 2012 at 10:38 am
Here's my take. This one uses the Common Table Expression and doesn't depend on the sys.columns table.
WITH e1 (N) AS -- 10 Records
(SELECT 1 UNION ALL SELECT 1 UNION ALL...
May 11, 2012 at 9:35 am
Yeah, I'm with most others. I find the question more interesting that the solution. Why was it he needed that?
October 25, 2011 at 6:56 am
We have SAS import from SQL server. This seems to work for some of the jobs we run. I'm not the one that creates the SAS jobs, so some of...
October 21, 2011 at 3:21 pm
I personally prefer the NOT EXISTS clause:
INSERT INTO invoices (INVNUM, PROVIDER, DIVISION, BA, AGE, SEX, TES_CRE_DT,
INV_CRE_DT, INV_SER_DT, measure)
SELECT A.invoice, A.Provider, A.Division, A.BA, A.AGE_AT_DOS, A.SEX, A.TES_CRE, A.INV_CRE_DT,
A.INV_SER_DT, A.Measure
SELECT A.invoice, A.Provider, A.Division,...
June 9, 2011 at 8:48 am
I would use a MERGE statement as well. Something along the lines like this:
MERGE tblPermTask AS pt
USING
(SELECT
ed1.intQuestionId,
ed1.intSRpAttendID,
q.strShortTask,
ed1.dtLogged,
ed1.intPersonnelId,
ed1.strRemarks,
Case WHEN ed1.strRemarks = '' THEN '' else 'SRP Notes' + ed1.strRemarks...
June 2, 2011 at 12:14 pm
If it were me, I would load the data in a staging table. Let's call that table Y. Then, I would use a MERGE statement (in a proc) like the...
May 31, 2011 at 10:24 am
Viewing 15 posts - 16 through 30 (of 36 total)