Viewing 15 posts - 1 through 15 (of 23 total)
I got solution.
So mine query will be like this:
DECLARE @Tbl AS TABLE
(
pk_Id INT PRIMARY KEY NOT NULL IDENTITY(1,1),
tblId INT,
tblNo NVARCHAR(50),
dt_StartTime DATETIME,
dt_EndTime DATETIME
)
In that, there are multiple records with same...
March 12, 2012 at 2:32 am
Thanks for the reply.
About your comment,
3. In your setup record with PK=3 is: '19081,19078',1683
but in your expected results you want to see it as 19081, 1683. Am I right to...
March 8, 2012 at 4:28 am
Hi,
Thanks for the reply.
So I will post again and here is:
Table "tbl_Reservation" contains below rows.
CREATE TABLE #tbl_Reservation
(
...
March 8, 2012 at 3:48 am
Guys,
Below one worked for me.
-- Itzik's VATN
CREATE FUNCTION dbo.fn_nums(@n AS bigint) RETURNS TABLE AS
RETURN
WITH
L0 AS(SELECT 1 AS c UNION ALL SELECT 1),
L1 AS(SELECT 1 AS c...
November 23, 2011 at 12:04 am
Hi,
I have slightly modified the query and it worked for me.
So query is:
UPDATE t1 SET sessionStTime = DATEADD(mi, RwNumber-1, sessionStTime)
FROM
(
SELECT sessionStTime,ROW_NUMBER() OVER (PARTITION by sessionStTime ORDER BY sessionStTime)...
September 16, 2011 at 4:22 am
There are above 50,000/ 1 Lac members. So do we need to create JOB and then schedule it? SO system will fire sp_send_dbmail from JOB?
June 23, 2011 at 3:42 am
June 23, 2011 at 3:33 am
Guys, Finally i got query.
SELECT dt_BirthDate FROM tbl_MARC_MemberMaster G
WHERE ISNULL(dt_BirthDate,'')<>'' AND CONVERT(VARCHAR,dt_BirthDate,101)<>'01/01/1900'
AND 1 = (FLOOR(DATEDIFF(dd,G.dt_BirthDate,CONVERT(SMALLDATETIME,'06/15/2011')+DATEDIFF(dd,CONVERT(SMALLDATETIME,'01/05/2011'),CONVERT(SMALLDATETIME,'06/15/2011'))) / 365.25))
- (FLOOR(DATEDIFF(dd,G.dt_BirthDate,CONVERT(SMALLDATETIME,'06/15/2011')) / 365.25))
Chao.
June 22, 2011 at 4:48 am
Thanks my friend. Really nice.
August 10, 2010 at 11:41 am
Hi,
Please find out the attached screen shots from my original post.
July 20, 2010 at 7:14 am
Hi,
To get distinct with max try this.
select name,MAX(amount) AS MaxValue from #temp group by name having MAX(amount) <> 0
TP get distinct with last record of each user, amount and count:
if...
July 20, 2010 at 3:17 am
Viewing 15 posts - 1 through 15 (of 23 total)