‎2007 May 02 5:06 AM
Hi Frnds ,
Iam having one doubt in Sql Querys i.e. Wat is the difference between EQ & IN When validating with sql Querys ...
Regs ,
Narayana Murthy
‎2007 May 02 5:09 AM
EQ is used to compare a single value while select query condition.
IN is used to compare a range of values while select query condition.
‎2007 May 02 5:16 AM
Hi
EQ is used for single value comparison and IN is used for multivalue comparison.
For Eg. If you want to check Sales Order number is equal to some value then you use EQ.
and
IN is used when you want to check whether the Sales order number is in the set of given sales order numbers.
‎2007 May 02 5:27 AM
Hi,
EQ is used to compare a single value while select query condition.
Ex : Parameters
IN is used to compare a range of values while select query condition.
Ex : SELECT-OPTIONS. This is like an internal table .So It has to check all the values of select-options(internal table).Becuase of that we have to use in for
1. SELECT-OPTIONS 2. RANGES.
Don't forget to reward if useful......
‎2007 May 02 5:27 AM
Eq can be used for checking for single field value
whereas IN can be used for checking multiple values, it can be used with select options and ranges.
IN will provide all records when the field you are checking with is blank
whereas
EQ will provide only those records where that field is blank in that record .
for eg
clear ABC
select ............where xyz = ABC. ABC is a parameter or variable
only those record where xyz is blank
clear ABC
select ............where xyz IN ABC. ABC is a select option or range
will fetch records for all the values of xyz.
‎2007 May 02 5:30 AM
hi,
EQ: This is used for single value field like parameters.
IN : this is used for a set of values / criteria/ranges... like select-options.
Regs,
Jogdand M B
‎2007 May 02 9:47 AM
EQ is used for parameters which take single value it is used while declaring parameters.
IN is used for selecting range of values it is used while declaring select options and ranges.
P_test = '123456'. * parameter declaration
in SQL queries while declaring range of values we will use in
Example.
s_test in matnr.
s_test 123456 to 1456789.
reward if useful.
‎2007 May 02 10:07 AM
Hi,
EQ is used to check against the single value.
IN is used to validate against range of values.
Reward if it is helpful
Regards.,
Sangeetha.A
‎2007 May 02 10:09 AM
Hi
by using EQ in conditions you can get a single value.
By using IN in conditions you can get a list of values.
when we are using conditions on selection texts, we use IN.
Regards,
Sreeram