Click here to Skip to main content
15,918,668 members
Home / Discussions / Database
   

Database

 
QuestionJAVA PROGRAM Pin
Sohail Sowell17-May-15 20:26
Sohail Sowell17-May-15 20:26 
AnswerRe: JAVA PROGRAM Pin
ZurdoDev22-May-15 4:41
professionalZurdoDev22-May-15 4:41 
QuestionGet date not exist Pin
Karan_TN11-May-15 3:15
Karan_TN11-May-15 3:15 
AnswerRe: Get date not exist Pin
Tim Carmichael11-May-15 4:49
Tim Carmichael11-May-15 4:49 
AnswerRe: Get date not exist Pin
MarbryH11-May-15 5:48
MarbryH11-May-15 5:48 
AnswerRe: Get date not exist Pin
Richard Deeming11-May-15 8:04
mveRichard Deeming11-May-15 8:04 
GeneralRe: Get date not exist Pin
Mycroft Holmes11-May-15 13:10
professionalMycroft Holmes11-May-15 13:10 
GeneralRe: Get date not exist Pin
Richard Deeming12-May-15 1:39
mveRichard Deeming12-May-15 1:39 
For 21 rows, there probably won't be much difference in performance between a CTE and a temp table.

I prefer the CTE solution because it's a single statement. With a temp table, you need to check if the table exists, create it, populate it, run your query, and drop it again.

Of course, if you've already got a tally table in your DB, then you could use that instead. It might even be worth creating a table of dates, so that you can mark holidays and other closures as well as weekends.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Get date not exist Pin
Mycroft Holmes12-May-15 14:11
professionalMycroft Holmes12-May-15 14:11 
QuestionDatabase Pin
Member 116493918-May-15 19:14
Member 116493918-May-15 19:14 
QuestionRe: Database Pin
Richard MacCutchan8-May-15 21:40
mveRichard MacCutchan8-May-15 21:40 
AnswerRe: Database Pin
Richard Andrew x649-May-15 6:16
professionalRichard Andrew x649-May-15 6:16 
Questionupdate query not updating Pin
turnerdavid7-May-15 3:55
turnerdavid7-May-15 3:55 
AnswerRe: update query not updating Pin
ZurdoDev7-May-15 4:12
professionalZurdoDev7-May-15 4:12 
GeneralRe: update query not updating Pin
turnerdavid7-May-15 8:08
turnerdavid7-May-15 8:08 
GeneralRe: update query not updating Pin
ZurdoDev7-May-15 8:12
professionalZurdoDev7-May-15 8:12 
GeneralRe: update query not updating Pin
turnerdavid7-May-15 8:18
turnerdavid7-May-15 8:18 
GeneralRe: update query not updating Pin
ZurdoDev7-May-15 8:58
professionalZurdoDev7-May-15 8:58 
GeneralRe: update query not updating Pin
turnerdavid7-May-15 10:26
turnerdavid7-May-15 10:26 
GeneralRe: update query not updating Pin
ZurdoDev7-May-15 10:35
professionalZurdoDev7-May-15 10:35 
QuestionSybase Access Violaion Error Pin
Ankit RS6-May-15 21:32
Ankit RS6-May-15 21:32 
SuggestionRe: Sybase Access Violaion Error Pin
ZurdoDev7-May-15 4:08
professionalZurdoDev7-May-15 4:08 
GeneralRe: Sybase Access Violaion Error Pin
Sascha Lefèvre7-May-15 6:25
professionalSascha Lefèvre7-May-15 6:25 
QuestionRe: Sybase Access Violaion Error Pin
Ankit RS8-May-15 0:36
Ankit RS8-May-15 0:36 
AnswerRe: Sybase Access Violaion Error Pin
Sascha Lefèvre8-May-15 10:02
professionalSascha Lefèvre8-May-15 10:02 

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.