Viewing 15 posts - 136 through 150 (of 240 total)
cljolly (8/25/2012)
August 25, 2012 at 12:24 am
What you did wrong was deleting the column. Next time use cut/copy – paste. There could have been other settings and hidden expressions.
Property name is HideDuplicates.
August 24, 2012 at 11:57 pm
Lynn, OTF,
I think what OP is talking about is redirecting STDOUT to a file (specified by the -o switch). This supposed to capture all output produced by SQL statements in...
August 24, 2012 at 11:21 pm
If this is actually a GUID then you can also do this:
DECLARE @UST VARCHAR(38) = '{784A4579-8689-438E-ADAA-9DCBC8A88AE7}';
SELECT CAST(CAST(@UST AS UNIQUEIDENTIFIER) AS VARCHAR(36));
August 24, 2012 at 10:10 pm
Try this:
;WITH AllCustomersCTE AS (
SELECT Customer FROM CustTable
UNION
SELECT DISTINCT Cust FROM OrderTable
)
SELECT
A.Customer
,COUNT(B.OrderNo) AS OrderTotal
FROM AllCustomersCTE AS A
...
August 24, 2012 at 9:47 pm
Try this:
SELECT
iSchoolYearCode
,cStudentID
,[Subject] = 'Math'
,Score = iMathScaleScore
FROM #temp1
UNION ALL
SELECT
iSchoolYearCode
,cStudentID
,[Subject] = 'Reading'
,Score = iReadingScaleScore
FROM #temp1
UNION...
August 24, 2012 at 8:13 am
OK, simplified update:
UPDATE #Cust SET
@CustNo = Cust_No = COALESCE(Cust_No, @CustNo);
August 23, 2012 at 10:21 pm
Try this:
CREATE TABLE #Cust(
Urn INT
,Cust_No VARCHAR(20)
);
INSERT INTO #Cust(Urn, Cust_No)
VALUES
(2, 200000),
(3, NULL),
(4, NULL),
(5, NULL),
(6, NULL),
(7,...
August 23, 2012 at 10:16 pm
1. Replication has completly different meaning in SQL Server from what you mean.
2. Your 2 examples are not equivalent: in 1st it seems you want to take first not NULL...
August 23, 2012 at 9:21 pm
I can think of 3 options:
1. Delete data in all related tables first.
2. Drop all relationships first.
3. Change relationship rules for Delete (to Cascade, for example).
August 23, 2012 at 3:01 am
I'm not sure I understand the following bolded areas:
.Netter (8/23/2012)
I have a stored procedure that returns all records that match a certain criteria, i only want to show the...
August 23, 2012 at 2:25 am
Homework?
You don't get value because pattern you've specified for PATINDEX doesn't match the data in the 4th row - there is no comma.
August 23, 2012 at 1:36 am
Well, since it's number of seconds elaplsed since 1970-01-01...
SELECT DATEADD(ss, 1345554248, '1970-01-01')
SELECT DATEADD(ss, 1345554580, '1970-01-01')
SELECT DATEADD(ss, 1345554271, '1970-01-01')
SELECT DATEADD(ss, 1345554603, '1970-01-01')
SELECT DATEADD(ss, 1345554033, '1970-01-01')
August 22, 2012 at 1:21 am
It's either Milli or Micro depending on the settings in Tools - Options.
Click on Duration column header and read the info.
August 22, 2012 at 1:06 am
Lokesh Vij (8/21/2012)
WITH CTE AS(
SELECT CAST( (SELECT CAST( col1 AS varchar(10))+ ','
FROM...
August 22, 2012 at 12:09 am
Viewing 15 posts - 136 through 150 (of 240 total)