Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ajr
Starting Member
11 Posts |
Posted - 2006-11-16 : 12:51:44
|
Hello all. I know some of the basics, but I am by no means a guru like alot of the people here, and I'm learning by fire! lol Here's a question that will problably be a breeze to you guys. I have a spec they want a query for, but I'm not sure where to start. I found a command called SET DATEFORMAT, but not really sure how to use it, or if it's even waht I need. Anyway here's what I was given to work from. I'd appreciate ay help you can give:This interface service describes how to populate the EFFDT field in the Project_7 table for a GL record.Input Parameter: G01.Acc_Eff_DTReference table: G011. If the code is being run for the first time return ‘2006-12-21’.2. Else if the current day of the week is Thursday return the date in the format of ‘YYYY-MM-DD’.3. Else return the date of the next Thursday in the format of ‘YYYY-MM-DD’. |
|
X002548
Not Just a Number
15586 Posts |
Posted - 2006-11-16 : 13:02:52
|
Got Books online?Also you talk about insert/update, and then discuss "return"What excatly do you have to do...I suspect you want to do SELECT REPLACE(CONVERT(char(10),GetDate(),102),'.','-')Just replace GetDate with your columnBut this really is a presentation issue...I ithink..you don't need to worry about formatting dates in sql serverBrett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam |
|
|
|
|
|