Monday, 27 January 2014


update table column with another table column

 update a   set a.Reg_Amt  = b.prod_cost   from entry a JOIN Product b    ON a.Reg_Amt=b.prod_cost

Wednesday, 22 January 2014



SQL Select Query :    

where condition  with substring


                 Product                                                    Prod_cost

  Basic Package 1500 INR                                    1500
  TopUp package Basic to Advanced                    5000
  Silver Package  3000 INR                           3000
  Advance Package 6000 INR                            6000
  TopUp Package Basic To Silver                  1800
  TopUp Package Silver To Advance                   3500



Query  :   select * from product where  left(product,6)='TopUp' order by prod_cost

Result :      TopUp package Basic to Advanced                    5000
                TopUp Package Basic To Silver                  1800
          TopUp Package Silver To Advance                   3500