Thursday, October 21, 2010
YogendraRai.blogspot.com: HTC Wildfire: A Review by a First Time User
Monday, May 17, 2010
Increasing value as Serial number in sql
Friday, April 2, 2010
Incremental column in select statement.
SELECT ROW_NUMBER() OVER (ORDER BY [Date] ASC) AS ROWID
,month([Date]) as Dt
FROM [TestChartDB].[dbo].[bom_Calendar]
Where FiscalYear=2010
Order by [Date]
Wednesday, March 31, 2010
find working hours between two date
CREATE function getWorkingHrsInMin(@datetime1 datetime,@datetime2datetime, @DailyWorkingHrs int)
returns int
as
begin
declare @time int
set @time=0
declare @tmpTbl table
(
Col_Date datetime,
Col_Day nvarchar(50),
WorkingHrs int
)
WHILE (@datetime1 <= @datetime2)
BEGIN
insert into @tmpTbl(Col_Date,Col_Day,Worki
values (@datetime1, CASE DATEPART(weekday,@datetime1)
@DailyWorkingHrs)
SET @datetime1 = @datetime1 + 1
END
set @time=(select sum(WorkingHrs)*60 from @tmpTbl whereCol_Day not in('Sat','Sun'))
return @time
end
select dbo.getWorkingHrsInMin('7-Mar-
Result:
2400
Thursday, September 24, 2009
Getting the Number of Tables in MS Access:
Select count(*) from MSysObjects where Type = 1 and Flags = 0
Fetching Records from Closed DB.
SELECT * FROM Employees IN "C:\northwind.mdb";