Viewing 15 posts - 721 through 735 (of 2,171 total)
Not according to OP requirements.
He is only storing dates with "no time information", ie time set to 00:00:00
And he wants dates for January 1st of every year to remain to...
September 1, 2008 at 11:59 pm
Sergiy, that will not work for January 1st dates.
However, you are not that far from a working suggestion.
Try this
DECLARE@Sample TABLE
(
Eno int,
Date datetime
)
Insert@Sample
select 1,'2006-06-30' union all
select 2,'2004-05-31' union all
select 3,'2007-01-01' union...
September 1, 2008 at 9:26 am
Jacob Luebbers (7/29/2008)
August 29, 2008 at 5:29 am
August 29, 2008 at 5:27 am
Also see similar behaviour here
August 29, 2008 at 5:23 am
DECLARE@Sample TABLE
(
ID INT PRIMARY KEY CLUSTERED,
Product VARCHAR(10),
DateValue DATETIME,
Value MONEY
)
INSERT@Sample
SELECT 1, 'Yak', 'Oct 17 2007 12:00AM', 0 UNION ALL
SELECT 2, 'Yak', 'Oct 17 2008 12:00AM', 2 UNION ALL
SELECT 4,...
August 29, 2008 at 2:13 am
Something similar to this
CREATE TRIGGER dbo.trgMyTrigger ON Crawler_Depth
AFTER INSERT
AS
SET NOCOUNT ON
UPDATEcd
SETcd.Hierarchy = cd.Hierarchy + CAST(cd.pkColumnNameHere AS VARCHAR(100)) + '.'
FROMCrawler_Depth AS cd
INNER JOINinserted AS i ON i.pkColumnNameHere = cd.pkColumnNameHere
August 29, 2008 at 2:02 am
DECLARE@Sample TABLE (c CHAR(1))
INSERT@Sample
(
c
)
SELECTCHAR(Number)
FROMmaster..spt_values
WHEREType = 'P'
AND Number BETWEEN 65 AND 90
SELECTc,
CHAR(65 + (ASCII(c) - 64) % 26)
FROM@Sample
August 28, 2008 at 3:51 pm
Yes.
select top 1 DEPTID from @t1
where EMPID = a.EMPID and WEFDATE <= a.DATE
order by WEFDATE desc
But there is still the...
August 26, 2008 at 7:45 am
It will work! 😛
ISNUMERIC('Spagetti') equals to 0.
August 26, 2008 at 7:44 am
Add this sample data
UNION ALL
SELECT '$1500,0'
and run your query again...
August 26, 2008 at 7:26 am
Or you can pass dates according ISO standard?
EXECUTE dbo.usp_ECL_Stock_Receipts '20080625', 'John Smith'
never fails.
August 26, 2008 at 7:23 am
On large tables, there might be a performance issue due to the "triangular join" in the correlated subquery.
August 26, 2008 at 7:20 am
Viewing 15 posts - 721 through 735 (of 2,171 total)