Viewing 15 posts - 1 through 15 (of 19 total)
Hi,
This query may be helpfull
select * from
(
select * from wip_master
) p
pivot
(
sum(qty) for code in ([CLM],[CON],[DAM],[FIN],[MIL],[NON],[REP],[RRT],[SHT])
) as result
February 29, 2016 at 12:53 am
Hi,
I think you may expected below results.
DECLARE @sampleData TABLE (
metric_name varchar(20),
num tinyint
)
INSERT INTO @sampleData
VALUES
('F3M_FCST',1)
,('L3M_SALES',2)
,('QTR_TRACKING',3)
,('SALES_VS_PRIOR',4)
,('F3M_FCST',1)
,('L3M_SALES',2)
,('QTR_TRACKING',3)
,('SALES_VS_PRIOR',4)
,('F3M_FCST',1)
,('L3M_SALES',2)
,('QTR_TRACKING',3)
,('SALES_VS_PRIOR',4)
,('F3M_FCST',1)
,('L3M_SALES',2)
,('QTR_TRACKING',3)
,('SALES_VS_PRIOR',4)
select * from ( select *,ROW_NUMBER()over(PARTITION by num order by...
February 18, 2016 at 5:32 am
For statistics also same procedure?. if same procedure is there any script to get create statistics script dynamically based on table and column name.
February 5, 2016 at 2:37 am
Hi,
Is there any other solution except drop and recreate index.
while recreate index i got below error
Msg 7999, Level 16, State 9, Line 1
Could not find any index...
February 5, 2016 at 2:21 am
Hi,
select DATEADD(hh,12,'2015-04-09 00:00:00.000')
Replace 12 and '2015-04-09 00:00:00.000' with your table column name "Hour" and "Date"
February 5, 2016 at 12:47 am
select T1.salaryname,T2.salaryname from
(
select ROW_NUMBER() over(order by salarycode ) as No,cast(salarycode as varchar)+salaryname as salaryname from basic where salarycode=1) T1
left join
(select ROW_NUMBER() over(order by salarycode ) as No,cast(salarycode ...
February 2, 2016 at 1:14 am
Hi Lowell,
here is my table structure,
create table #temptable
(
ResourceName varchar(100),
ResourceCode varchar(100),
RecordID varchar(100),
Program varchar(100),
Laboratory varchar(100),
Test_Date varchar(30),
Analyte varchar(50),
DetectedValue varchar(100),
UOM varchar(20),
CorrectiveAction varchar(100),
AnalyteComments varchar(500)
)
January 6, 2016 at 12:01 am
Hi chrism,
Thanks a lot.
December 7, 2015 at 6:09 am
hi,
updated priroty_hashvalue column also like below but it's constraint violated
update testtable set priroty1=@priroty1,
priroty2=@priroty2,
priroty3=@priroty3,
priroty_hashvalue=hashbytes('md5',@priroty1+@priroty2+@priroty3) where clause.
June 23, 2014 at 4:33 am
Priority_hashvalue genereate like below
insert into testtable(priroty1,priroty2,priroty3,Priority_hashvalue) values(@priroty1,@priroty2,@priroty3,hashbytes('md5',(@priroty1+@priroty2+priroty3)))
June 23, 2014 at 2:58 am
Hi Valued Member,
i have install vs sp1 in my system,for rectify this problem which software(hot fix) i have to install .
Below are sql server version details which i use in...
January 23, 2014 at 10:38 pm
Hi try this.
******START******
-- Declare the variables to store the values returned by FETCH.
DECLARE @truck varchar(3), @min_lic varchar(12);
DECLARE id_cursor CURSOR FOR
SELECT truck,min_lic FROM KPIPlukkTidStart;
OPEN id_cursor;
Fetch Next From id_cursor into @truck,@min_lic
-- Check...
May 27, 2013 at 3:54 am
Hi surindersinghthakur,
insert into doc values(1,'A')
insert into doc values(3,'A')
the above records was not match with Code='I' in doc table right .but you are not displaying in query output result.those records you...
April 29, 2013 at 12:23 am
hi,
before finding sub string you should trim the data otherwise it takes empty data also.
select id,SUBSTRING(Reverse(LTRIM(RTRIM(name))),3,1) from emp
April 25, 2013 at 3:34 am
Viewing 15 posts - 1 through 15 (of 19 total)