Viewing 15 posts - 1 through 15 (of 16 total)
Gianluca Sartori (10/3/2011)
drew.allen (10/3/2011)
Prasanthi Reddy (10/2/2011)
Hi,I have a table which contains on and off status of a meter. Feederstatus = 0 means On and feederstatus=1 means Off.
You do realize that...
October 3, 2011 at 10:24 pm
Can any DBA clarify my doubt please???
Thanks in advance..
September 15, 2011 at 5:39 am
There will be different meter makers. The data from each meter make will be in different format . They will follow some standard.
Also some times the data from meters...
September 15, 2011 at 12:40 am
just useful ?? not helpful ? 😀 did it solve ur problem ?
🙂 of course it is helpful also solved the problem.. that's why i asked you about CTE...
September 14, 2011 at 3:20 am
it's useful..thank you..
can you please share some references or pdf's if you have to learn about CTEs and OVER clause..
September 14, 2011 at 12:47 am
hi..
sorry for the late reply..
I will explain you clearly.
I have a view which stores the data of all the transactions of all the customers.
My requirement is I should get a...
September 13, 2011 at 11:21 pm
As the requirement is in real time confidential data base, i can't post the original table structure and data.
So i have given the sample data but the requirement is same.
The...
September 12, 2011 at 5:13 am
Sudhir Dwivedi (9/12/2011)
select CustomerId, count(*) RechargeNr from customer_trans
group by customerid
having Count(*)>2 and DATEDIFF(day, MIN(RechargeDate), MAX(RechargeDate))<=5...
September 12, 2011 at 1:02 am
Thanks for your reply..
The out put for the script is as below..
Can you please explain why customerid 1 is coming two times???
CustomerIdRechargeDate(No column name)
12011-08-12 ...
September 12, 2011 at 12:21 am
Please find the script below..
create table customer_trans
(
customerid int,
rechargeamt varchar(50),
rechargedate varchar(30)
);
insert into customer_trans values(1,'100.00','2011-08-12');
insert into customer_trans values(2,'500.00','2011-08-15');
insert into customer_trans values(1,'300.00','2011-08-12');
insert into customer_trans values(3,'100.00','2011-08-12');
insert into customer_trans values(3,'700.00','2011-08-12');
insert into customer_trans values(2,'100.00','2011-08-15');
insert into customer_trans...
September 11, 2011 at 11:26 pm
Thanks for the reply..
I tried as create procedure GET_HEIRARCHY_CODE(@str varchar(50),@code varchar(30) OUTPUT)
AS
BEGIN
-----statements
RETURN @CODE;
END
but while executing it is asking to pass value for @code also..
can u pls explain how to do...
August 20, 2011 at 3:00 am
Thanks for the reply..
I tried as create procedure GET_HEIRARCHY_CODE(@str varchar(50),@code varchar(30) OUTPUT)
AS
BEGIN
-----statements
RETURN @CODE;
END
but while executing it is asking to pass value for @code also..
can u pls explain how to do...
August 20, 2011 at 2:59 am
kumar20 (8/16/2011)
SET NOCOUNT ONDECLARE @score TABLE (
[PlayerId] [INT] IDENTITY(1,1) NOT NULL,
[PlayerName] [VARCHAR](50) NULL,
[PlayerScore] [INT] NULL,
[ScoreDate] [VARCHAR](30) NULL,
[overs] [INT] NULL)
INSERT INTO @score VALUES('sunil',5,'16-08-2011',1)
INSERT INTO @score VALUES('sunil',8,'16-08-2011',2)
INSERT INTO @score VALUES('sunil',13,'16-08-2011',3)
INSERT INTO...
August 16, 2011 at 3:09 am
Thank u so much... it's working fine..
August 16, 2011 at 2:57 am
This gives complete score in 1st over also in 2nd over. I want the score only in 2nd over.
i.e., difference between 2nd over and 1st over's score.
Also i want to...
August 16, 2011 at 2:00 am
Viewing 15 posts - 1 through 15 (of 16 total)