Viewing 15 posts - 31 through 45 (of 5,355 total)
See if this helps: http://support.microsoft.com/default.aspx?scid=kb;EN-US;280102
December 28, 2005 at 2:40 am
Actually I guess the 2. example contains a typo and that you're after the last effectivedate for each entry in employeeID. If so, this might help
USE Northwind
SELECT t1.* FROM [order...
December 27, 2005 at 7:49 am
Something like this?
DECLARE @OneYearAgo DATETIME
SET @OneYearAgo = DATEADD(YEAR,-1,DATEADD(MONTH,DATEDIFF(MONTH,0,GETDATE()),0))
SELECT @OneYearAgo
SELECT DATEADD(MONTH, Number, @OneYearAgo)
FROM master..spt_values
WHERE Type='P' AND Number BETWEEN 1 AND 12
December 27, 2005 at 6:21 am
See if this helps: http://support.microsoft.com/lifecycle/?p1=2852
December 23, 2005 at 3:00 am
Just for fun, here's another variation on that topic
SELECT
PARSENAME(REPLACE('EXISTING SERVICE-DESKTOP HARDWARE-PC', '-','.'),1)
December 22, 2005 at 8:21 am
You might try using a linked server or http://pgfoundry.org/projects/dbi-link/
December 20, 2005 at 7:50 am
No need to query the system tables directly. It's better to use something like
USE Northwind
SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'Orders'
or even
EXEC sp_columns 'Orders'
December 20, 2005 at 6:20 am
How much more opinions do you need?
Anyway, if you also like to overclock your servers, check this out: http://www.sqlservercentral.com/columnists/rmarda/letsblockthedba.asp
December 20, 2005 at 2:47 am
Brian, check out http://www.rssbandit.org/ It's now an Open Source project using the .Net framework. Like Sharpreader it is mentioned here http://www.microsoft.com/communities/guide/rss.mspx
Latest version of RSSBandit also allows NNTP access, so...
December 20, 2005 at 1:54 am
As I'm being told, MS dropped their announced new DATE data type from SQL Server 2005. What a pity!
Btw, when you are interested -...
December 20, 2005 at 1:21 am
Aah, yes, I forgot about these hex thingies which are convertible to INT. One of these strange days, I get following results
SELECT ISNUMERIC(0X0e) AS E, ISNUMERIC(0X0f) AS F
E F
----------- -----------...
December 20, 2005 at 1:18 am
Sergiy.......... CAST( CAST( ( MyTs - 0.5 ) as integer ) as smalldatetime )
PW............... convert(smalldatetime, floor(convert (float, MyTs )))
David Burrows... CAST(DATEADD(day,DATEDIFF(day,0,@dateField),0) as smalldatetime)
Frank Kalis..... CAST(CAST(SUBSTRING(CAST(MyTs AS BINARY(4)),1,2) AS INT) AS...
December 19, 2005 at 5:30 am
You might want to check out my reply here: http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=202581 CHAR(160) is a non-breakable space and as such considered a "noise" character in SQL Server. At least CAST treats it...
December 19, 2005 at 2:58 am
This will create a number table with 1 millon sequential numbers
CREATE TABLE Numbers(Number INT NOT NULL PRIMARY KEY)
GO
INSERT Numbers
SELECT HundredThousand * 100000 + Tenthousand * 10000 + thousand *...
December 16, 2005 at 5:44 am
Just for giggles. You can also use the internal storage format of a SMALLDATETIME to get rid of the TIME portion.
DECLARE @dt SMALLDATETIME
SET @dt =...
December 16, 2005 at 4:48 am
Viewing 15 posts - 31 through 45 (of 5,355 total)