Click here to Skip to main content
15,890,369 members
Home / Discussions / Database
   

Database

 
GeneralRe: problem with scope_identity using cmd.Parameters Pin
brunoskorepa13-May-04 7:58
brunoskorepa13-May-04 7:58 
GeneralsqlDataReader is Busy Fetching.... Pin
-Dr_X-8-May-04 15:44
-Dr_X-8-May-04 15:44 
GeneralRe: sqlDataReader is Busy Fetching.... Pin
Aryadip12-May-04 20:47
Aryadip12-May-04 20:47 
GeneralRe: sqlDataReader is Busy Fetching.... Pin
Rob Graham13-May-04 3:52
Rob Graham13-May-04 3:52 
GeneralResolution: sqlDataReader is Busy Fetching.... Pin
-Dr_X-13-May-04 11:22
-Dr_X-13-May-04 11:22 
GeneralSQL query for Date field Pin
Imtiaz Murtaza7-May-04 23:46
Imtiaz Murtaza7-May-04 23:46 
GeneralRe: SQL query for Date field Pin
Henrik Stuart8-May-04 0:39
Henrik Stuart8-May-04 0:39 
GeneralDates table YTD Pin
Ruchi Gupta7-May-04 10:54
Ruchi Gupta7-May-04 10:54 
Hi All,

Currently in my stored procedure I need to build a table with all dates starting 1st Jan to the date passed (YTD). Cuurently the way I do is, I start from first date of year and loop till @Datepassed, ignoring Sat and Sun.

	SELECT @tdate = @YEAR_start<br />
<br />
	WHILE @tdate <= @Datepassed<br />
	BEGIN<br />
		if DATEPART (dw, @tdate) not in (1,7)<br />
			INSERT 	INTO #DATES (tdate)<br />
			VALUES	(@tdate)<br />
<br />
			SELECT 	@tdate = dateadd (dd,1,@tdate)<br />
	END


Foreg:- if dec 12 2003 is passed, looping becomes inefficient.

Does any body know a better way.

Thanks
Ruchi
GeneralRe: Dates table YTD Pin
Heath Stewart10-May-04 10:19
protectorHeath Stewart10-May-04 10:19 
GeneralDatabinding across forms Pin
Dave Wilson7-May-04 7:53
Dave Wilson7-May-04 7:53 
GeneralRe: Databinding across forms Pin
Dave Wilson7-May-04 8:13
Dave Wilson7-May-04 8:13 
General&quot;Specified cast is not allowed&quot; calling DataAdapter.Fill Pin
jmocas7-May-04 5:32
sussjmocas7-May-04 5:32 
GeneralRe: &quot;Specified cast is not allowed&quot; calling DataAdapter.Fill Pin
Aryadip12-May-04 0:26
Aryadip12-May-04 0:26 
GeneralRe: &quot;Specified cast is not allowed&quot; calling DataAdapter.Fill Pin
vSoares12-May-04 0:52
professionalvSoares12-May-04 0:52 
GeneralDTS Problem : Insertion of failed records Pin
KSEI6-May-04 23:01
KSEI6-May-04 23:01 
GeneralRe: DTS Problem : Insertion of failed records Pin
RichardGrimmer7-May-04 0:48
RichardGrimmer7-May-04 0:48 
GeneralProvide progress during lenghty stored procedure Pin
Froefel6-May-04 21:17
Froefel6-May-04 21:17 
GeneralClickety Pin
Colin Angus Mackay6-May-04 23:58
Colin Angus Mackay6-May-04 23:58 
GeneralNeed help importing data Pin
Anonymous6-May-04 8:39
Anonymous6-May-04 8:39 
GeneralDeleting all record from Database Table with ADO.NET Pin
Gary Hyslop6-May-04 4:06
Gary Hyslop6-May-04 4:06 
GeneralRe: Deleting all record from Database Table with ADO.NET Pin
Mazdak6-May-04 6:47
Mazdak6-May-04 6:47 
GeneralRe: Deleting all record from Database Table with ADO.NET Pin
Chris Meech6-May-04 9:17
Chris Meech6-May-04 9:17 
GeneralRe: Deleting all record from Database Table with ADO.NET Pin
Guillermo Rivero6-May-04 10:05
Guillermo Rivero6-May-04 10:05 
GeneralRe: Deleting all record from Database Table with ADO.NET Pin
-Dr_X-8-May-04 15:50
-Dr_X-8-May-04 15:50 
QuestionMs Access Problem? Pin
catztay5-May-04 13:39
catztay5-May-04 13:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.