Viewing 15 posts - 16 through 30 (of 120 total)
Yes I know it, that's why I try to cleansing it, do you have any idea how to do it using TSQL

Every rule in a world of bits and bytes, can be bend or eventually be broken
MyBlog About Common dialog control
A Visualizer for viewing SqlCommand object script [/url]
May 4, 2014 at 7:19 pm
Please post your table structure and some sample data and what is your desired output

Every rule in a world of bits and bytes, can be bend or eventually be broken
MyBlog About Common dialog control
A Visualizer for viewing SqlCommand object script [/url]
May 1, 2014 at 6:59 pm
May be this will help you
declare @abc_test as table (
id int ,runs int ,date1 datetime
)
insert into @abc_test ( id ,runs ,date1 )
values
('24','1','2013-12-05 10:00:01.000'),
('24','2','2013-12-05 10:00:02.000'),
('25','1','2013-12-05 10:00:03.000'),
('25','2','2013-12-05 10:00:04.000'),
('25','3','2013-12-05 10:00:06.000'),
('26','1','2013-12-05 10:00:07.000'),
('26','2','2013-12-05...

Every rule in a world of bits and bytes, can be bend or eventually be broken
MyBlog About Common dialog control
A Visualizer for viewing SqlCommand object script [/url]
May 1, 2014 at 2:32 am
Once I will test it and let you know

Every rule in a world of bits and bytes, can be bend or eventually be broken
MyBlog About Common dialog control
A Visualizer for viewing SqlCommand object script [/url]
April 30, 2014 at 6:11 pm
i am not sure what you are doing, anyway here is my contribution hope this will help what you want to do
USE tempdb
GO
IF OBJECT_ID('dbo.T1' ) IS NOT NULL
BEGIN
DROP TABLE dbo.T1
DROP...

Every rule in a world of bits and bytes, can be bend or eventually be broken
MyBlog About Common dialog control
A Visualizer for viewing SqlCommand object script [/url]
April 30, 2014 at 1:28 am
Thanks,
Please mark as solution for the posts which gives you a desired result, keep it in mind, my solution is not elegant, since I am using...

Every rule in a world of bits and bytes, can be bend or eventually be broken
MyBlog About Common dialog control
A Visualizer for viewing SqlCommand object script [/url]
April 29, 2014 at 7:10 pm
might not be the elegant one but it is a solution
WITH SampleData(PERSON, [DT], [HRS], [DOW]) AS
(
SELECT 1234, CAST('03/31/2014' AS DATETIME),...

Every rule in a world of bits and bytes, can be bend or eventually be broken
MyBlog About Common dialog control
A Visualizer for viewing SqlCommand object script [/url]
April 29, 2014 at 12:03 am
just a curiosity?
may i know why are you using processing instruction?
for your vb.net code

Every rule in a world of bits and bytes, can be bend or eventually be broken
MyBlog About Common dialog control
A Visualizer for viewing SqlCommand object script [/url]
April 25, 2014 at 7:46 am
OMG ,
What a merge statement?
My small suggestion
execute the using part separately and find the low performing area then
analyse the query as per your tables and indexes you...

Every rule in a world of bits and bytes, can be bend or eventually be broken
MyBlog About Common dialog control
A Visualizer for viewing SqlCommand object script [/url]
April 25, 2014 at 7:36 am
hi there, it is almost same with Stuart Davies's but the logic is different
my solution is avoid the summation two times the other solution using two times grouping and...

Every rule in a world of bits and bytes, can be bend or eventually be broken
MyBlog About Common dialog control
A Visualizer for viewing SqlCommand object script [/url]
April 25, 2014 at 7:27 am
ON T.CT_YEAR in
(
case
.[DBO].[FN_GET_YEAR]
(
CAST
(
C.[YEAR] AS VARCHAR(4)
)
+ '-01-01'
)
when 'L' then 'L'
when 'C' then 'C'
when 'O' then 'O'
else 'N'
end
)
AND T.CH_CODE = C.PROJECTID
...

Every rule in a world of bits and bytes, can be bend or eventually be broken
MyBlog About Common dialog control
A Visualizer for viewing SqlCommand object script [/url]
April 25, 2014 at 6:07 am
Well try this one i am not sure what you want do
but to my best
Create a Dos batch file using the following batch script
ECHO :ON ERROR Exit>>"All in...

Every rule in a world of bits and bytes, can be bend or eventually be broken
MyBlog About Common dialog control
A Visualizer for viewing SqlCommand object script [/url]
April 25, 2014 at 5:22 am
how about this one
DECLARE @test-2 AS TABLE (Code nvarchar (2),Amt numeric(18, 0))
INSERT INTO @test-2
VALUES
('09',1000), ('09',12000), ('09',1300), ('09',1400), ('09',1500),
('10',2000), ('10',2100), ('10',2200), ('10',2300), ('10',2400), ('10',2500),
('11',3000), ('11',3100), ('11',3200), ('11',3300),...

Every rule in a world of bits and bytes, can be bend or eventually be broken
MyBlog About Common dialog control
A Visualizer for viewing SqlCommand object script [/url]
April 25, 2014 at 5:06 am
create a case when expression on the base cte like this
CASE
WHEN t.[DATA] LIKE 'GA%' THEN 1
...

Every rule in a world of bits and bytes, can be bend or eventually be broken
MyBlog About Common dialog control
A Visualizer for viewing SqlCommand object script [/url]
April 25, 2014 at 4:43 am
well it's a llittle tricky
DECLARE @User AS TABLE ([UserId] [int] NOT NULL, [Active] [bit] NOT NULL,USerName VARCHAR(10))
DECLARE @UserReporting AS TABLE ([UserId] [int] NOT NULL, [ReportingUserId] [int] NULL)
INSERT...

Every rule in a world of bits and bytes, can be bend or eventually be broken
MyBlog About Common dialog control
A Visualizer for viewing SqlCommand object script [/url]
April 23, 2014 at 5:31 am
Viewing 15 posts - 16 through 30 (of 120 total)