Click here to Skip to main content
15,894,405 members
Home / Discussions / Database
   

Database

 
AnswerRe: Did I do a bad database design? Pin
Suaysh Andhare3-Oct-07 0:03
Suaysh Andhare3-Oct-07 0:03 
AnswerRe: Did I do a bad database design? Pin
PIEBALDconsult3-Oct-07 4:48
mvePIEBALDconsult3-Oct-07 4:48 
GeneralRe: Did I do a bad database design? Pin
Rohde3-Oct-07 7:37
Rohde3-Oct-07 7:37 
GeneralRe: Did I do a bad database design? Pin
DQNOK4-Oct-07 4:46
professionalDQNOK4-Oct-07 4:46 
QuestionUsing ADO in VC++ Pin
Jackson862-Oct-07 19:49
Jackson862-Oct-07 19:49 
AnswerRe: Using ADO in VC++ Pin
Ilya Verbitskiy3-Oct-07 5:23
Ilya Verbitskiy3-Oct-07 5:23 
GeneralRe: Using ADO in VC++ Pin
Jackson863-Oct-07 19:32
Jackson863-Oct-07 19:32 
QuestionConcatenating Sql queries Pin
falles012-Oct-07 14:55
falles012-Oct-07 14:55 
Hi,

I have a long SQL querie and my TL has asked that I concatenate them so I am not repeating the same querie over and over again. The thing is, each querie is inside a new for loop so if I concatenate, it is not picking up the previous query. For example this is what I had before for each for loop except that the end where clause is different for each.
<br />
for bla bla<br />
{<br />
ring sql = "select e.Firstname,e.Lastname,r.Role,r.Description,d.DivisionName,a.Applications,m.ManagerFirstname,m.ManagerLastname,t.ProgLanguagesDatabase" +<br />
                        " from employees e,Division d,Manager m,TechnicalSkills t,Role r,Applications a where " +<br />
                        " e.ManagerID = m.ManagerID<br />


My TL wants me to write
for {
sql1 = blabla
}


for bla
{
sql2 = sql1 + (Sql query)
}

Obviously it is telling me that sql2 does not exist. At the moment I have something like this after the queries.

SqlDataAdapter myCommand = new SqlDataAdapter(sql, myConnection);

and obviously I can't overload this each time with sql2, sql3 etc)???



Sianny aka Sharny
AnswerRe: Concatenating Sql queries Pin
Christian Graus2-Oct-07 15:37
protectorChristian Graus2-Oct-07 15:37 
GeneralRe: Concatenating Sql queries Pin
falles012-Oct-07 15:42
falles012-Oct-07 15:42 
GeneralRe: Concatenating Sql queries Pin
falles012-Oct-07 15:53
falles012-Oct-07 15:53 
GeneralRe: Concatenating Sql queries Pin
Christian Graus2-Oct-07 16:46
protectorChristian Graus2-Oct-07 16:46 
GeneralRe: Concatenating Sql queries Pin
falles013-Oct-07 13:57
falles013-Oct-07 13:57 
QuestionBackup Pin
mehrdadc482-Oct-07 7:28
mehrdadc482-Oct-07 7:28 
AnswerRe: Backup Pin
Paul Conrad2-Oct-07 10:22
professionalPaul Conrad2-Oct-07 10:22 
QuestionSQL interception on client workstation. Pin
LinCorJDE2-Oct-07 2:39
LinCorJDE2-Oct-07 2:39 
AnswerRe: SQL interception on client workstation. Pin
Colin Angus Mackay2-Oct-07 2:44
Colin Angus Mackay2-Oct-07 2:44 
GeneralRe: SQL interception on client workstation. Pin
LinCorJDE2-Oct-07 2:58
LinCorJDE2-Oct-07 2:58 
QuestionMicrosoft ODBC Driver for Oracle [urgent] Please Help Pin
Programm3r1-Oct-07 21:56
Programm3r1-Oct-07 21:56 
AnswerRe: Microsoft ODBC Driver for Oracle [urgent] Please Help Pin
Programm3r2-Oct-07 1:23
Programm3r2-Oct-07 1:23 
AnswerRe: Microsoft ODBC Driver for Oracle [urgent] Please Help Pin
Pete O'Hanlon2-Oct-07 1:24
mvePete O'Hanlon2-Oct-07 1:24 
GeneralRe: Microsoft ODBC Driver for Oracle [urgent] Please Help Pin
Programm3r2-Oct-07 4:58
Programm3r2-Oct-07 4:58 
GeneralRe: Microsoft ODBC Driver for Oracle [urgent] Please Help Pin
Pete O'Hanlon2-Oct-07 9:55
mvePete O'Hanlon2-Oct-07 9:55 
JokeRe: Microsoft ODBC Driver for Oracle [urgent] Please Help Pin
ChandraRam2-Oct-07 21:05
ChandraRam2-Oct-07 21:05 
QuestionDuplicate with the Same Identity Number Pin
Vimalsoft(Pty) Ltd1-Oct-07 21:54
professionalVimalsoft(Pty) Ltd1-Oct-07 21:54 

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.