Click here to Skip to main content
15,898,538 members
Home / Discussions / Database
   

Database

 
GeneralRe: Recordset results (solved) Pin
scorp_scorp14-Feb-11 16:09
scorp_scorp14-Feb-11 16:09 
GeneralRe: Recordset results (solved) Pin
Wendelius16-Feb-11 8:30
mentorWendelius16-Feb-11 8:30 
QuestionSyntex Error, Missing Operator !!! Pin
scorp_scorp12-Feb-11 17:47
scorp_scorp12-Feb-11 17:47 
AnswerRe: Syntex Error, Missing Operator !!! Pin
Luc Pattyn12-Feb-11 18:08
sitebuilderLuc Pattyn12-Feb-11 18:08 
GeneralRe: Syntex Error, Missing Operator !!! DIDNT work [modified] Pin
scorp_scorp12-Feb-11 18:53
scorp_scorp12-Feb-11 18:53 
AnswerRe: Syntex Error, Missing Operator !!! Pin
Wendelius12-Feb-11 21:29
mentorWendelius12-Feb-11 21:29 
GeneralRe: Syntex Error, Missing Operator !!! [modified] Pin
scorp_scorp12-Feb-11 21:35
scorp_scorp12-Feb-11 21:35 
GeneralRe: Syntex Error, Missing Operator !!! Pin
Wendelius12-Feb-11 22:12
mentorWendelius12-Feb-11 22:12 
If scope is a string your statement should be something like
sqls = "SELECT c_number, c_description, c_scope, c_category, c_type " & _
FROM tb_c  " & _
WHERE c_scope = '" & scope & "' " & _
AND c_number IN ( SELECT c_number  " & _
                  FROM tb_c_details  " & _
                  WHERE e_id = " & eid & " )" 


Also instead of using literals (concatenated values) in your statement you should use bind variables. This way you're more safe from SQL injections, datatype mismatches, syntax errors etc

[addition]
Concenring the latter error, you should use aliases in the select portion. Like:
SELECT distinct tb_c.c_number, tb_c.c_description ...

The need to optimize rises from a bad design.My articles[^]

GeneralRe: Syntex Error, Missing Operator !!! Pin
scorp_scorp12-Feb-11 22:27
scorp_scorp12-Feb-11 22:27 
GeneralRe: Syntex Error, Missing Operator !!! Pin
Wendelius12-Feb-11 22:42
mentorWendelius12-Feb-11 22:42 
QuestionHow to make auto number start from 2000 Pin
ivo7511-Feb-11 7:18
ivo7511-Feb-11 7:18 
AnswerRe: How to make auto number start from 2000 Pin
Wendelius11-Feb-11 7:45
mentorWendelius11-Feb-11 7:45 
GeneralRe: How to make auto number start from 2000 Pin
ivo7511-Feb-11 9:29
ivo7511-Feb-11 9:29 
GeneralRe: How to make auto number start from 2000 Pin
Wendelius11-Feb-11 10:15
mentorWendelius11-Feb-11 10:15 
AnswerRe: How to make auto number start from 2000 Pin
Abhinav S12-Feb-11 21:47
Abhinav S12-Feb-11 21:47 
QuestionProblem installing SQL Server 2005 on Vista Pin
gaby5811-Feb-11 5:01
gaby5811-Feb-11 5:01 
AnswerRe: Problem installing SQL Server 2005 on Vista Pin
Wendelius11-Feb-11 5:32
mentorWendelius11-Feb-11 5:32 
AnswerRe: Problem installing SQL Server 2005 on Vista Pin
a1mimo28-Feb-11 2:14
a1mimo28-Feb-11 2:14 
Questionsql Pin
kesavan210-Feb-11 22:51
kesavan210-Feb-11 22:51 
AnswerRe: sql PinPopular
Luc Pattyn10-Feb-11 23:31
sitebuilderLuc Pattyn10-Feb-11 23:31 
GeneralRe: sql Pin
Jörgen Andersson11-Feb-11 1:22
professionalJörgen Andersson11-Feb-11 1:22 
GeneralRe: sql Pin
PIEBALDconsult11-Feb-11 1:50
mvePIEBALDconsult11-Feb-11 1:50 
GeneralRe: sql Pin
Luc Pattyn11-Feb-11 1:58
sitebuilderLuc Pattyn11-Feb-11 1:58 
GeneralRe: sql Pin
Pravin Patil, Mumbai11-Feb-11 2:10
Pravin Patil, Mumbai11-Feb-11 2:10 
Questiondifference b/w clustered and non-clustered index... Pin
siva4559-Feb-11 19:34
siva4559-Feb-11 19:34 

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.