abhijitm
-
Posts
4 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by abhijitm
-
-
thnks a lot ..but i m not looking for this solution ...i want a single query....
-
In my querry i am using a variable for B and S( they r the columns of a table) In case the value for field S in provided as NULL then i want all the rows with given value of column 'B'and if field 'S' is passed some non-null value then i want the rows having given values for B and SFor example B S1 121 1312 142 now i want to write a querry such that if i pass 1 for B and 12 for S then my querry returns row 1 only and if i pass 1 for B and NULL for S then i get row 1,2 and 3. Hopei make my self clearer nowsorry, I don't understand your condition. -
i have a table wid one column 'B' as primary key and another column 'S' which can hold null values. Now i want to write a query such that[1] i supply a value for 'B' [2] either a value or NULL for 'S'If the field 'S' has some value other than NULL then the rows corresponding to B AND S for the given values are selected and if field 'S' has null then all the rows with value supplied to 'B' are seleceted. Please help me with the query....
Condition in Query
in SQL
Posted