Viewing 15 posts - 1,741 through 1,755 (of 2,171 total)
The article was re-released today, so don't take it personal
About PIVOT and UNPIVOT in SQL Server 2005; I have more use for UNPIVOT...
March 30, 2007 at 3:00 am
Here is an explanation of how DATEDIFF works. It applies to hours as well.
http://www.sqlteam.com/item.asp?ItemID=26922
March 29, 2007 at 3:13 pm
And since this is a SQL Server 2005 forum, why not post a better performing query, than Mark's?
DECLARE
@Sample TABLE (Truck_ID...
March 29, 2007 at 1:00 pm
Yes. But is it the right one? Mine also works according to original posting.
It's a matter of interpretation. Until original poster comes back, all we can do is guessing.
March 29, 2007 at 12:57 pm
I don't get duplicates with this
-- Prepare sample data
DECLARE
@Sample TABLE (PART_ID INT, DATE...
March 29, 2007 at 9:22 am
I meant like creating a new aggregate function MEDIAN.
SELECT MIN(Col1), MAX(Col1), STDEV(Col1), AVG(Col1), MEDIAN(Col1) FROM Table1
March 29, 2007 at 8:57 am
SELECT
t1.PART_ID,
t1.DATE,
t1.PART_CD,
t1.REN_CD,
March 29, 2007 at 8:48 am
If you are using SQL Server 2000, why do you post a question in the SQL Server 2005 forum?
March 29, 2007 at 8:43 am
So with CLR you can extend the T-SQL language, or just write new functions, just like UDF?
March 29, 2007 at 6:18 am
SET NOCOUNT ON
DECLARE @Constraints TABLE
(
ConstraintID SMALLINT IDENTITY(0, 1),
UNIQUE_CONSTRAINT_CATALOG NVARCHAR(128),
UNIQUE_CONSTRAINT_SCHEMA NVARCHAR(128),
UNIQUE_CONSTRAINT_NAME NVARCHAR(128),
CONSTRAINT_CATALOG NVARCHAR(128),
CONSTRAINT_SCHEMA NVARCHAR(128),
CONSTRAINT_NAME NVARCHAR(128),
TABLE_CATALOG NVARCHAR(128),
TABLE_SCHEMA NVARCHAR(128),
TABLE_NAME NVARCHAR(128)
 
INSERT @Constraints
(
UNIQUE_CONSTRAINT_CATALOG,
UNIQUE_CONSTRAINT_SCHEMA,
UNIQUE_CONSTRAINT_NAME,
CONSTRAINT_CATALOG,
CONSTRAINT_SCHEMA,
CONSTRAINT_NAME,
TABLE_CATALOG,
TABLE_SCHEMA,
TABLE_NAME
 
SELECT rc.UNIQUE_CONSTRAINT_CATALOG,
rc.UNIQUE_CONSTRAINT_SCHEMA,
rc.UNIQUE_CONSTRAINT_NAME,
tc.CONSTRAINT_CATALOG,
tc.CONSTRAINT_SCHEMA,
tc.CONSTRAINT_NAME,
kcu.TABLE_CATALOG,
kcu.TABLE_SCHEMA,
kcu.TABLE_NAME
FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc
INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE...
March 29, 2007 at 4:24 am
Try this SQL Server 2005 approach
SELECT
PART_ID,
DATE,
PART_CD,
REN_CD
March 29, 2007 at 2:52 am
NEW INFORMATION?
You are using DTS to determine the rows to exclude?
You always can create a TEMP table.
Please try the suggestions first before dissing them!
March 29, 2007 at 2:47 am
The path to the application is RELATIVE to the SQL Server machine.
March 29, 2007 at 2:44 am
CASE
WHEN code= '#' Then 'A'
WHEN code = '$'
March 29, 2007 at 1:55 am
You have to do an "UPSERT".
First an UPDATE
UPDATE t1
SET t1.ColX = t2.Col1
FROM Table1 AS t1
INNER JOIN Table2 AS t2 ON t2.ColBlue = t1.ColWarm
Then an INSERT
INSERT Table1 (ColA, ColB, ColC)
SELECT...
March 28, 2007 at 12:31 am
Viewing 15 posts - 1,741 through 1,755 (of 2,171 total)