Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Monday, March 26, 2012

Retriew number of sunday,s for a given month in sql server

hello i am student and developing project having the fallowing problem

1: i want to calculate the number of sunday,s in a given month.

OR between two given dates like 01/02/06 and 28/02/06 .

thanks

Hi,

this should solve the problem, input is the day of the week you want to get.

CREATE FUNCTION NumberOfWeekdays
(
@.StartDate DATETIME,
@.EndDate DATETIME,
@.Weekday TINYINT
)
RETURNS INT
BEGIN
DECLARE @.dt DATETIME
DECLARE @.NumberofDays INT
SET @.NumberofDays = 0

SET @.dt = @.StartDate
WHILE @.dt < @.EndDate
BEGIN
SET @.NumberofDays = @.NumberofDays + (CASE WHEN DATEPART(dw,@.dt) = @.Weekday THEN 1 ELSE 0 END)
SET @.dt = @.dt+1
END
RETURN @.NumberofDays
END

HTH; Jens Suessmeyer.

Monday, March 12, 2012

retrieving data from database...

Hi all,

I am working on a project on PocketPC in which it is required to reteive data from database. I have created database on simulator as .sdf file. I want to retreive data from eVC++ code. How i can do so?

thanx

If you are trying to access a database using C++ code it sounds like the .Net Compact Framework isn't really involved. You might find better information in the Smart Devices Native C++ Development forum.

-Noah

.Net Compact Framework

Tuesday, February 21, 2012

Retrieve Data from Web Services Using DTS (SQL Server 2000)

The project I'm currently working on involves combining data from one SQL Server 2000 databases and XML returned from a web service into a 3rd SQL Server 2000 database.

This process must be scheduled to happen once a day. If it weren't for the Web Service, I'd say that this is a no-brainer and I'd use DTS. However, I'm not sure if I can even access a Web Service with DTS. Has anyone done this or have any tips?

Id try the microsoft.public.sqlserver.dts forum if I were you.

-Jamie