Click here to Skip to main content
15,888,968 members
Home / Discussions / Database
   

Database

 
GeneralRe: Backup & Restore. Pin
Nanda_MR21-Jan-09 20:01
Nanda_MR21-Jan-09 20:01 
GeneralRe: Backup & Restore. Pin
Wendelius21-Jan-09 20:08
mentorWendelius21-Jan-09 20:08 
QuestionRAISEERROR problem Pin
George_George19-Jan-09 20:13
George_George19-Jan-09 20:13 
AnswerRe: RAISEERROR problem Pin
J4amieC19-Jan-09 22:17
J4amieC19-Jan-09 22:17 
GeneralRe: RAISEERROR problem Pin
George_George20-Jan-09 2:51
George_George20-Jan-09 2:51 
AnswerRe: RAISEERROR problem Pin
Hamid_RT22-Jan-09 23:18
Hamid_RT22-Jan-09 23:18 
GeneralRe: RAISEERROR problem Pin
George_George4-Feb-09 22:44
George_George4-Feb-09 22:44 
QuestionOptimize an query select DB Pin
TuanNGUYEN19-Jan-09 16:48
TuanNGUYEN19-Jan-09 16:48 
Hi all,
I have a table whick have got 2 fields [id - info], for example :
id info
1 A
2 B
3 C
...

Now, in my program, there is an array of id in program, ex : [1, 3, ...]. Now, I want to query the table to get the corresponding array of objects[id-info] like that : [[1, A], [3, C]...]. I knew some ways, but I think theys are still optimized, as following, 2 ways I knew :
- foreach array of id, get info correspoding the id, then add to the result array => each id, I have to query the DB 1 time => not good.
- generate a big select query with WHERE Condition is like (where id = 1 or id = 2 ...) => query DB 1 time, but the condition expression is complex to verify for DB.
- generate a big select query with Where condition is like (where id in[1, 2, 3]) => similair to 2rd way, not very good.
I think there are still better way, could you help me.
Currently, I am using C# with MSSQL, but I will change to MySQL in several months.
Thanks in advance.
AnswerRe: Optimize an query select DB Pin
Wendelius19-Jan-09 18:19
mentorWendelius19-Jan-09 18:19 
GeneralRe: Optimize an query select DB Pin
TuanNGUYEN19-Jan-09 20:04
TuanNGUYEN19-Jan-09 20:04 
GeneralRe: Optimize an query select DB Pin
Wendelius20-Jan-09 8:28
mentorWendelius20-Jan-09 8:28 
Question"begin catch" and "end catch" Pin
George_George19-Jan-09 2:38
George_George19-Jan-09 2:38 
AnswerRe: "begin catch" and "end catch" Pin
J4amieC19-Jan-09 4:02
J4amieC19-Jan-09 4:02 
GeneralRe: "begin catch" and "end catch" Pin
George_George19-Jan-09 18:41
George_George19-Jan-09 18:41 
AnswerRe: "begin catch" and "end catch" Pin
Rob Philpott19-Jan-09 6:29
Rob Philpott19-Jan-09 6:29 
GeneralRe: "begin catch" and "end catch" Pin
George_George19-Jan-09 18:40
George_George19-Jan-09 18:40 
GeneralRe: "begin catch" and "end catch" Pin
Rob Philpott19-Jan-09 23:13
Rob Philpott19-Jan-09 23:13 
GeneralRe: "begin catch" and "end catch" Pin
George_George20-Jan-09 3:01
George_George20-Jan-09 3:01 
GeneralRe: "begin catch" and "end catch" Pin
Rob Philpott20-Jan-09 3:13
Rob Philpott20-Jan-09 3:13 
AnswerRe: "begin catch" and "end catch" Pin
Wendelius19-Jan-09 7:06
mentorWendelius19-Jan-09 7:06 
GeneralRe: "begin catch" and "end catch" Pin
George_George19-Jan-09 18:51
George_George19-Jan-09 18:51 
GeneralRe: "begin catch" and "end catch" Pin
Wendelius20-Jan-09 6:39
mentorWendelius20-Jan-09 6:39 
AnswerRe: "begin catch" and "end catch" Pin
Hamid_RT22-Jan-09 23:18
Hamid_RT22-Jan-09 23:18 
QuestionConvert Columns as Rows Pin
Vignesh Krishnan19-Jan-09 1:40
Vignesh Krishnan19-Jan-09 1:40 
AnswerRe: Convert Columns as Rows Pin
Wendelius19-Jan-09 2:05
mentorWendelius19-Jan-09 2:05 

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.