Viewing 15 posts - 1,231 through 1,245 (of 2,007 total)
darth_vodka (12/1/2011)
aaaaaaaaaaaaaaahbrilliant
memo to self...use "IS NULL" not "ISNULL"
thanks guys
It has nothing to do with ISNULL. It has to do with the implicit conversion of the empty string into a DATETIME.
You...
December 1, 2011 at 6:56 am
deepkt (12/1/2011)
Thanks for your reply.If possible please post some code. Suggest me list of steps. Is it possible to connect Exchange server 2007 using SSIS?
Thanks.
http://msdn.microsoft.com/en-us/library/ms191461.aspx
EXEC sp_addlinkedserver 'exchange',
'Exchange OLE DB...
December 1, 2011 at 6:50 am
Define the "first occurrence". SQL is unordered sets of data, so there is no defined "first" unless specified by the code in an ORDER BY.
With the sample data you have...
December 1, 2011 at 6:48 am
Because your WHERE clause is implicitly converting an empty string to a datetime.
e.g.
SELECT CAST('' AS DATETIME)
Which equals "1900-01-01 00:00:00.000".
So your WHERE clause is basically as follows: -
WHERE ISNULL(a.DayBase,'') <> '1900-01-01...
December 1, 2011 at 6:25 am
cliff.gettings (11/30/2011)
Unfortunately, I still unsure what to do.. you refer to a csv file? I don't have this in a csv file, these are in a table in SQL...
December 1, 2011 at 6:16 am
Here's the responses from the other version of this post -
Cadavre (12/1/2011)
SELECT aYr, bYr, aCol, CASE WHEN aYr = bYr...
December 1, 2011 at 6:07 am
And another
SELECT aYr, bYr, aCol, bCol
FROM #A a
INNER JOIN (SELECT bYr, bCol, MAX(bYr) OVER (PARTITION BY (SELECT NULL)) AS maxbYr
...
December 1, 2011 at 6:05 am
tmccar (12/1/2011)
Sorry but I'm not sure what this does. I ran the query and it says
Ummm. . .
Cadavre (12/1/2011)
Please write your sample data in this format
I was showing you how...
December 1, 2011 at 5:27 am
Not sure I know what you're asking. Does this help?
BEGIN TRAN
CREATE TABLE #user
(id int identity(1, 1),
userid int,
firstname VARCHAR(20) NULL,)
INSERT INTO #user (userid,firstname) VALUES (4,'Duke')
INSERT INTO #user (userid,firstname) VALUES (5,'David')
INSERT INTO...
December 1, 2011 at 5:23 am
Untested: -
CREATE TABLE #A (aYr INT, aCol INT)
INSERT #A (aYr, aCol) VALUES (2008, 2)
INSERT #A (aYr, aCol) VALUES (2009, 5)
INSERT #A (aYr, aCol) VALUES (2010, 9)
INSERT #A (aYr, aCol) VALUES...
December 1, 2011 at 4:16 am
bitbucket-25253 (11/30/2011)
December 1, 2011 at 3:58 am
tmccar (12/1/2011)
OK, here is what I've tried:
SELECT Smalltable.[Drawing Number], "Path"
FROM Smalltable
INNER JOIN Largetable
ON Smalltable.[Drawing Number]=Largetable.[Drawing Number]
But I'm...
December 1, 2011 at 3:44 am
itay barda (12/1/2011)
I now added a primary key to this table. it's identity 1,2,3,4...
What John was asking you for was ddl scripts and readily consumable sample data, such as this:...
December 1, 2011 at 2:39 am
And another, far uglier method 😀
DECLARE @startdate DATETIME
SET @startdate = '2011-11-18'
SELECT DATEADD(DAY,ISNULL(NULLIF(ISNULL(NULLIF(ISNULL(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(DATEDIFF(dd,0,@startdate)%7,0),1),2),3),6),1),4),3),5),2), @startdate)
November 30, 2011 at 10:00 am
Viewing 15 posts - 1,231 through 1,245 (of 2,007 total)