Click here to Skip to main content
15,917,618 members
Home / Discussions / Database
   

Database

 
QuestionStored Procedure for Creating DTS Package Pin
saswatpadhan23-Aug-07 12:53
saswatpadhan23-Aug-07 12:53 
AnswerRe: Stored Procedure for Creating DTS Package Pin
Rami Said Abd Alhalim24-Aug-07 6:15
Rami Said Abd Alhalim24-Aug-07 6:15 
QuestionDataRowCollection.Find Method Throws ArgumentException when the parameter passed is a Guid object. Pin
reinaldo.aru23-Aug-07 10:49
reinaldo.aru23-Aug-07 10:49 
AnswerRe: DataRowCollection.Find Method Throws ArgumentException when the parameter passed is a Guid object. Pin
Rocky#24-Aug-07 1:35
Rocky#24-Aug-07 1:35 
QuestionConfiguration Error in Setting Up Web Application Pin
Gbenle23-Aug-07 9:41
Gbenle23-Aug-07 9:41 
AnswerRe: Configuration Error in Setting Up Web Application Pin
Marek Grzenkowicz23-Aug-07 23:15
Marek Grzenkowicz23-Aug-07 23:15 
QuestionRecommendations for storing Year Ends Pin
Chris Meech23-Aug-07 9:37
Chris Meech23-Aug-07 9:37 
AnswerRe: Recommendations for storing Year Ends Pin
DerekFL23-Aug-07 10:52
DerekFL23-Aug-07 10:52 
You may want to look at AdventureWorksDW DimTime table. Its a OLAP concept where you use a DayTimeKey to refer to a lookup table DimTime for actual date and other pre-aggregated data.
You might be able to insert just one date for every day with FiscalYear and then use

SELECT [FiscalYear]
FROM [dbo].[DimTime]dt
INNER JOIN MyTable t1 ON CONVERT(varchar(23), t1.DateColumn, 101) = dt.[FullDateAlternateKey]



CREATE TABLE [dbo].[DimTime]
(
[DayTimeKey] [bigint] IDENTITY(1,1) PRIMARY KEY NOT NULL,
[FullDateAlternateKey] [datetime] NULL,
[DayNumberOfWeek] AS (datepart(weekday,[FullDateAlternateKey])),
[DayNameOfWeek] AS (datename(weekday,[FullDateAlternateKey])),
[DayNumberOfMonth] AS (datepart(day,[FullDateAlternateKey])),
[CalendarYear] AS (datepart(year,[FullDateAlternateKey])),
[MonthName] AS (datename(month,[FullDateAlternateKey])),
[MonthNumberOfYear] AS (DATEPART(mm, [FullDateAlternateKey])),
[CalendarQuarter] [tinyint] NULL,
[CalendarYear] [char](4) NULL,
[CalendarSemester] [tinyint] NULL,
[FiscalQuarter] [tinyint] NULL,
[FiscalYear] [char](4) NULL,
[FiscalSemester] [tinyint] NULL
)


Dave Evans

GeneralRe: Recommendations for storing Year Ends Pin
Chris Meech24-Aug-07 5:07
Chris Meech24-Aug-07 5:07 
QuestionRandom Select Pin
mehrdadc4823-Aug-07 8:19
mehrdadc4823-Aug-07 8:19 
AnswerRe: Random Select [modified] Pin
Michael Potter23-Aug-07 8:43
Michael Potter23-Aug-07 8:43 
GeneralRe: Random Select Pin
PIEBALDconsult23-Aug-07 9:27
mvePIEBALDconsult23-Aug-07 9:27 
AnswerRe: Random Select Pin
Rocky#23-Aug-07 19:55
Rocky#23-Aug-07 19:55 
GeneralRe: Random Select Pin
PIEBALDconsult24-Aug-07 7:57
mvePIEBALDconsult24-Aug-07 7:57 
QuestionSQL query Pin
Milind Panchal23-Aug-07 6:56
Milind Panchal23-Aug-07 6:56 
AnswerRe: SQL query Pin
Michael Potter23-Aug-07 8:20
Michael Potter23-Aug-07 8:20 
GeneralRe: SQL query Pin
Milind Panchal23-Aug-07 18:29
Milind Panchal23-Aug-07 18:29 
GeneralRe: SQL query Pin
Rocky#23-Aug-07 20:11
Rocky#23-Aug-07 20:11 
GeneralRe: SQL query Pin
Michael Potter24-Aug-07 5:10
Michael Potter24-Aug-07 5:10 
QuestionHow to upload an Ntext column value to a text file Pin
edukulla23-Aug-07 6:48
edukulla23-Aug-07 6:48 
QuestionHow can I optimize this script? Pin
Skanless23-Aug-07 6:11
Skanless23-Aug-07 6:11 
AnswerRe: How can I optimize this script? Pin
Michael Potter23-Aug-07 8:41
Michael Potter23-Aug-07 8:41 
Questionreturn int (urgent) [modified] Pin
ksaw12323-Aug-07 5:28
ksaw12323-Aug-07 5:28 
AnswerRe: return int (urgent) Pin
Colin Angus Mackay23-Aug-07 5:34
Colin Angus Mackay23-Aug-07 5:34 
GeneralRe: return int (urgent) [modified] Pin
ksaw12323-Aug-07 5:38
ksaw12323-Aug-07 5:38 

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.