Jump to content

abhijitm

Members
  • Posts

    4
  • Joined

  • Last visited

abhijitm's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. the following works for the above ::select B,S from <TABLE_NAME> Where B = :b_value AND (S=:s_value OR :s_value='<dummy_value>' OR :s_value is NULL )
  2. thnks a lot ..but i m not looking for this solution ...i want a single query....
  3. 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 now
  4. 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....
×
×
  • Create New...