Posts

Showing posts from 2013

Difference between Byte and Char in Oracle

If you define the field as VARCHAR2(11 BYTE), Oracle will allocate 11 bytes for storage, but you may not actually be able to store 11 characters in the field, because some of them take more than one byte to store, e.g. non-English characters. By defining the field as VARCHAR2(11 CHAR) you tell Oracle to allocate enough space to store 11 characters, no matter how many bytes it takes to store each one. I believe that in Oracle 10g, 3 bytes per character were used.

DATA TABLE BIND WITH GRIDVIEW

                                                  DATA TABLE BIND WITH GRIDVIEW DataTable TempTable = new DataTable();         TempTable.Columns.Add("Business_Place");         TempTable.Columns.Add("Within_State");         TempTable.Columns.Add("Outside_State");                DataRow dtrow;         dtrow = TempTable.NewRow();         dtrow["Business_Place"] = "Factories";         dtrow["Within_State"] = list[0].FACTORY_IN.ToString();      ...

Dictionary used for key value pair

       var dicQuarter = new Dictionary<List<Dealer>, int >();         dicQuarter.Add("-Select-", 0);             dicQuarter.Add("Quarter-I", 1);             dicQuarter.Add("Quarter-II", 2);             dicQuarter.Add("Quarter-III", 3);             dicQuarter.Add("Quarter-IV", 4);                                     ddlAuthorisedFullName.DataSource = dicQuarter;                     ddlAuthorisedFullName.DataTextField = "FULLNAME";    ...

How to Open PopUp Window

write this script on that aspx page from which the page is redirect to popup window   <script type="text/javascript">     function popup(url,width,height) {     var left = (screen.width - width) / 2;     var top = (screen.height - height) / 2;     var params = 'width=' + width + ', height=' + height;     params += ', top=' + top + ', left=' + left;     params += ', toolbar=no';     params += ', menubar=no';     params += ', resizable=yes';     params += ', directories=no';     params += ', scrollbars=yes';     params += ', status=no';     params += ', location=no';     newwin = window.open(url, 'd', params);     if (window.focus)     {         newwin.focus()     }     return false;  ...

Insert value from one table into exsiting table in oracle i.e merge

Merge Use the MERGE statement to select rows from one table for update or insertion into another table. The decision whether to update or insert into the target table is based on a condition in the ON clause. It is a new feature of Oracle Ver. 9i. It is also known as UPSERT i.e. combination of UPDATE and INSERT. For example suppose we are having sales and sales_history table with the following structure.   SALES Prod Month Amount SONY SONY SONY SONY SONY SONY JAN FEB MAR APR MAY JUN 2200 3000 2500 3200 3100 5000 SALES HISTORY Prod Month Amount SONY SONY SONY AKAI JAN MAR APR JAN 2000 2500 3000 3200 Now we want to update sales_history table from sales table i.e. those rows whi...