Viewing 15 posts - 841 through 855 (of 2,007 total)
narendra.babu57 (3/1/2012)
Hi,Some dates it will coming invalid. Why it happen?
For example 29-10-2011,30-08-2011 dates... --it will come Invalid
You said your dates were in this format -- 10/29/2011. So I coded the...
March 1, 2012 at 2:37 am
sku370870 (3/1/2012)
Seeing your code makes me realise what a novice I am at this lark.
Can I ask ...
Using that 'With' statement,...
March 1, 2012 at 2:30 am
It's the syntax used to delete using a subquery.
February 29, 2012 at 7:43 am
five_ten_fiftyfold (2/29/2012)
I guess sometimes you need to dance with the Devil 🙂
Again, nope. You could use FOR XML to generate your SQL dynamically then execute it.
e.g.
DECLARE @sql AS NVARCHAR(MAX);
SELECT @sql...
February 29, 2012 at 7:20 am
Lowell (2/29/2012)
I had no idea I could go to Object Explorer>>Specific Database>> Programmability>>Assemblies and script them out.
I'd always take a model and copy/pasted all the pieces into...
February 29, 2012 at 6:00 am
No, because the @YEARMONTH is an INT. So in my example, 20000101, represents the 1st Jan 2000, but when we minus 93 from the @YEARMONTH we get 20000008 which...
February 29, 2012 at 5:36 am
Not sure I'd go so far as to say I hate it, but I do think it's a bit too graphic for a professional forum.
February 29, 2012 at 5:34 am
Lowell (2/29/2012)
what's the trick?
i've only done it manually so far, nd it's a pain....load...
February 29, 2012 at 5:32 am
You've not shown where @Yearmonth is declared or assigned. Nor have you shown DDL for the tables involved.
WHERE (RTRIM(YEAR(A.DOCDATE)) + RIGHT('0' + CONVERT(VARCHAR, MONTH(A.DOCDATE)), 2) <= @YEARMONTH) AND
(RTRIM(YEAR(A.DOCDATE)) +...
February 29, 2012 at 5:29 am
narendra.babu57 (2/29/2012)
hi bellow format is mix with another month also but i need separate month wise
Fairly certain that you won't have the same issue with my CLR.
As I see...
February 29, 2012 at 4:42 am
Sample data:-
SELECT date, cnt, Empcode
INTO QMaster
FROM (VALUES(N'2/2/2011', 1, 101),(N'2/2/2011', 1, 102),
(N'2/4/2011', 1, 103),(N'2/4/2011', 1, 104),(N'2/6/2011', 1, 105),
(N'2/6/2011', 1, 106),(N'2/8/2011', 1, 107),(N'2/9/2011', 1, 108),
(N'2/10/2011', 1, 109),(N'2/11/2011', 1, 110),(N'2/11/2011', 1, 111),
(N'2/24/2011', 1,...
February 29, 2012 at 4:32 am
five_ten_fiftyfold (2/29/2012)
Interesting...Does this mean I'm going to have to use a cursor for this operation, one way or another?
You could create your scripts dynamically into a variable then use sp_executesql...
February 29, 2012 at 3:25 am
You can block all avatars in control panel -> forum settings.
February 28, 2012 at 3:16 am
fahey.jonathan (2/24/2012)
February 24, 2012 at 8:52 am
Viewing 15 posts - 841 through 855 (of 2,007 total)