Click here to Skip to main content
15,921,941 members
Home / Discussions / Database
   

Database

 
GeneralRe: CASE when false query Pin
Wendelius18-Feb-09 7:37
mentorWendelius18-Feb-09 7:37 
GeneralRe: CASE when false query Pin
foryou19-Feb-09 1:55
foryou19-Feb-09 1:55 
GeneralRe: CASE when false query Pin
Wendelius19-Feb-09 5:53
mentorWendelius19-Feb-09 5:53 
GeneralFormulas in SQL Server Reporting Services Pin
dboy22116-Feb-09 11:04
dboy22116-Feb-09 11:04 
GeneralRe: Formulas in SQL Server Reporting Services Pin
Diving Flo17-Feb-09 23:44
Diving Flo17-Feb-09 23:44 
QuestionIn search of a better solution... Pin
Jörgen Sigvardsson16-Feb-09 6:50
Jörgen Sigvardsson16-Feb-09 6:50 
AnswerRe: In search of a better solution... [modified] Pin
Wendelius16-Feb-09 7:04
mentorWendelius16-Feb-09 7:04 
GeneralRe: In search of a better solution... Pin
Jörgen Sigvardsson16-Feb-09 8:35
Jörgen Sigvardsson16-Feb-09 8:35 
I forgot to mention that there's an upper and lower limit of the slots. The limits may be 1 and 999 for example. Essentially, the query would be "pick any number between 1 and 999, that isn't found in the table".

For small ranges such as [1, 999], it's probably easiest to select everything and order by the primary key (a no op, since the primary key index is sorted already), and then scan for the next pair of adjacent slots X and Y where X + 1 != Y. That means that X + 1 must be available. This is however not feasible if the slot span is large-ish, because it'll degrade to a table scan... Frown | :(



GeneralRe: In search of a better solution... Pin
Wendelius17-Feb-09 1:26
mentorWendelius17-Feb-09 1:26 
GeneralRe: In search of a better solution... Pin
Jörgen Sigvardsson17-Feb-09 1:34
Jörgen Sigvardsson17-Feb-09 1:34 
GeneralRe: In search of a better solution... Pin
Wendelius17-Feb-09 2:10
mentorWendelius17-Feb-09 2:10 
GeneralRe: In search of a better solution... Pin
Jörgen Andersson17-Feb-09 2:53
professionalJörgen Andersson17-Feb-09 2:53 
GeneralRe: In search of a better solution... Pin
Jörgen Sigvardsson17-Feb-09 1:34
Jörgen Sigvardsson17-Feb-09 1:34 
GeneralRe: In search of a better solution... Pin
Wendelius17-Feb-09 2:10
mentorWendelius17-Feb-09 2:10 
AnswerRe: In search of a better solution... Pin
Ennis Ray Lynch, Jr.17-Feb-09 5:15
Ennis Ray Lynch, Jr.17-Feb-09 5:15 
AnswerRe: In search of a better solution... Pin
PIEBALDconsult17-Feb-09 16:15
mvePIEBALDconsult17-Feb-09 16:15 
GeneralRe: In search of a better solution... Pin
Jörgen Sigvardsson17-Feb-09 20:58
Jörgen Sigvardsson17-Feb-09 20:58 
QuestionFull Text Query Pin
Muhammad Fahim Baloch16-Feb-09 4:51
Muhammad Fahim Baloch16-Feb-09 4:51 
GeneralDouble-Post: Full Text Query Pin
Wendelius16-Feb-09 5:06
mentorWendelius16-Feb-09 5:06 
GeneralRe: Ansssssssssssssss meeeeeeeeeeeeee Pin
Muhammad Fahim Baloch16-Feb-09 19:14
Muhammad Fahim Baloch16-Feb-09 19:14 
GeneralRe: Ansssssssssssssss meeeeeeeeeeeeee Pin
Mycroft Holmes16-Feb-09 21:25
professionalMycroft Holmes16-Feb-09 21:25 
GeneralRe: Ansssssssssssssss meeeeeeeeeeeeee Pin
Muhammad Fahim Baloch16-Feb-09 22:14
Muhammad Fahim Baloch16-Feb-09 22:14 
GeneralYou are a fool Pin
Mycroft Holmes16-Feb-09 22:33
professionalMycroft Holmes16-Feb-09 22:33 
GeneralRe: You are a fool Pin
Muhammad Fahim Baloch16-Feb-09 23:11
Muhammad Fahim Baloch16-Feb-09 23:11 
GeneralRe: You are a fool Pin
J4amieC16-Feb-09 23:25
J4amieC16-Feb-09 23:25 

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.