Click here to Skip to main content
15,902,635 members
Home / Discussions / Database
   

Database

 
Question[Message Deleted] Pin
Uma J3-Dec-09 20:24
Uma J3-Dec-09 20:24 
AnswerRe: Exporting data from stored procedure to excel spreadsheets Pin
dan!sh 3-Dec-09 20:46
professional dan!sh 3-Dec-09 20:46 
QuestionExport records to excel from sql Pin
padmanabhan N3-Dec-09 19:17
padmanabhan N3-Dec-09 19:17 
AnswerRe: Export records to excel from sql Pin
T21023-Dec-09 19:29
T21023-Dec-09 19:29 
AnswerRe: Export records to excel from sql Pin
dan!sh 3-Dec-09 19:39
professional dan!sh 3-Dec-09 19:39 
QuestionHow do I make a MS Access Subform, A Special Case...] [modified] Pin
new_phoenix3-Dec-09 14:28
new_phoenix3-Dec-09 14:28 
AnswerRe: How do I make a MS Access Subform, A Special Case...] Pin
Mycroft Holmes3-Dec-09 18:43
professionalMycroft Holmes3-Dec-09 18:43 
QuestionOptions besides sql dependency? Pin
prommel3-Dec-09 11:30
prommel3-Dec-09 11:30 
AnswerRe: Options besides sql dependency? Pin
Mycroft Holmes3-Dec-09 14:13
professionalMycroft Holmes3-Dec-09 14:13 
Questiondatabase design Pin
AndyInUK3-Dec-09 4:09
AndyInUK3-Dec-09 4:09 
AnswerRe: database design Pin
dan!sh 3-Dec-09 4:23
professional dan!sh 3-Dec-09 4:23 
GeneralRe: database design Pin
AndyInUK3-Dec-09 5:21
AndyInUK3-Dec-09 5:21 
GeneralRe: database design Pin
dan!sh 3-Dec-09 6:01
professional dan!sh 3-Dec-09 6:01 
GeneralRe: database design Pin
Mycroft Holmes3-Dec-09 14:09
professionalMycroft Holmes3-Dec-09 14:09 
GeneralRe: database design Pin
dan!sh 3-Dec-09 18:31
professional dan!sh 3-Dec-09 18:31 
QuestionSqlite (Max Value) Pin
jashimu3-Dec-09 3:56
jashimu3-Dec-09 3:56 
AnswerRe: Sqlite (Max Value) Pin
loyal ginger3-Dec-09 4:03
loyal ginger3-Dec-09 4:03 
GeneralRe: Sqlite (Max Value) Pin
jashimu3-Dec-09 4:45
jashimu3-Dec-09 4:45 
GeneralRe: Sqlite (Max Value) Pin
jashimu3-Dec-09 5:49
jashimu3-Dec-09 5:49 
GeneralRe: Sqlite (Max Value) Pin
dan!sh 3-Dec-09 6:03
professional dan!sh 3-Dec-09 6:03 
GeneralRe: Sqlite (Max Value) Pin
Mycroft Holmes3-Dec-09 14:03
professionalMycroft Holmes3-Dec-09 14:03 
QuestionHow to get currect number of weeks for the given date considering when 31st december is saturday Pin
chakran2-Dec-09 20:06
chakran2-Dec-09 20:06 
Hi,
I have a situation where I wanted to have the weekno for the given date.
If year is changing then weekno should add with the previous weekno.
Below is the table contains two columns, Bug date and corresponding weeknumber... till 12/31/2011 I am getting correctly but after that am getting wrong result.   for 01/01/2012 the weeknumber should be 158 but am getting 157, can any one help me solve this problem..Pls see my logic below... am using sql server 2008.

Bug Date      weeknumber
10/25/2009     44
11/01/2009     45
12/30/2009     53
12/31/2009     53
01/01/2010     53
01/03/2010     54
12/30/2010     105
12/31/2010     105
01/01/2011     105
01/02/2011     106
01/04/2011     106
12/30/2011     157
12/31/2011     157
01/01/2012     158
01/08/2012     158

DECLARE @FirstDate char(20)    
DECLARE @baseyear char(20)    
SET @FirstDate =(SELECT Min(Bugdate) FROM BugsDB_DefectVolume)
SET @baseyear=(SELECT Datepart(year,@FirstDate))   //am considering the first date as base year.

UPDATE BugsDB_DefectVolume
SET weeknumber= Datepart(wk,@BugDate) + ((Datepart(year,@BugDate) - @baseyear) *52),
StartDayofWeek=DATEadd(day, (1- DATEPART(dw,@BugDate)), @BugDate)
WHERE BugDate=@BugDate and [Product ID]=@ProductID
AnswerRe: How to get currect number of weeks for the given date considering when 31st december is saturday Pin
WoutL2-Dec-09 21:56
WoutL2-Dec-09 21:56 
GeneralRe: How to get currect number of weeks for the given date considering when 31st december is saturday Pin
chakran2-Dec-09 22:01
chakran2-Dec-09 22:01 
GeneralRe: How to get currect number of weeks for the given date considering when 31st december is saturday Pin
WoutL2-Dec-09 23:36
WoutL2-Dec-09 23:36 

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.