Viewing 15 posts - 2,461 through 2,475 (of 2,645 total)
If you make all the FK's ON DELETE CASCADE you can just delete small batches of rows from the Sample table. You would need indexes on the SampleID columns on...
July 8, 2014 at 11:31 am
Normally when an example is given using values A, B and C they should be taken as algebraic variables who's contents can change. More like this example:
June 12, 2014 at 9:40 am
Alexander-449406 (6/6/2014)
June 6, 2014 at 8:45 am
This script may be ok to use on some occasions but if the entry of the parameters is from an external input, e.g. a web page, then it could be...
May 15, 2014 at 4:32 am
Or this:
;WITH CTE AS
(
SELECT E.Company,
E.Employee,
...
May 6, 2014 at 10:04 am
I think simply testing for existence should do what you need.
SELECT E.Company,
E.Employee,
E.TermDate
FROM...
May 6, 2014 at 8:46 am
Good article. Nice way of selecting all columns when detecting duplicates for a subset of the columns.
April 29, 2014 at 5:56 am
Is there a maximum number of distinct serial numbers or are there at most 7 like in your example?
April 9, 2014 at 8:05 am
I think this might be what you need:
;WITH CTE AS
(
SELECT DISTINCT
SerialBox
...
April 7, 2014 at 10:00 am
I just tried it on a bit of xml that had a DataLength of 13859 and it took 3:28 (3 minutes 28 seconds) to complete. I then tried it on...
August 5, 2013 at 7:26 am
I tried running it on a bit of xml that stores an order on our database.
It ran for over 6 minutes before I stopped it.
August 5, 2013 at 5:24 am
Using a cursor:
DECLARE myCursor cursor LOCAL FORWARD_ONLY FAST_FORWARD READ_ONLY
FOR SELECT OfficeId
FROM dbo.Office
DECLARE @OfficeId int,...
July 10, 2013 at 5:03 am
Or using CROSS APPLY:
SELECT OfficeID,
S.StateAbbr,
C.countrynames
FROM dbo.Office O
CROSS APPLY (SELECT TOP(1)
...
July 9, 2013 at 9:04 am
A csv list can also be generated using "FOR XML"
I rewrote the final query using this method:
SELECT OfficeID,
(SELECT TOP(1)
...
July 9, 2013 at 3:26 am
Viewing 15 posts - 2,461 through 2,475 (of 2,645 total)