Pages

Saturday, November 30, 2013

How to resolve too many declarations of 'TO_CHAR' match this call

Have you ever got message
"ORA-06550: line 3, column 9:
PLS-00307: too many declarations of 'TO_CHAR' match this call
ORA-06550: line 3, column 2:
PL/SQL: SQL Statement ignored" ? 


If so, it is the right place for you :). This post will discuss about "How to resolve too many declarations of 'TO_CHAR' match this call" in oracle.

The problem is that your pl/sql is selecting something like '0' and returning a string. The result is that you are attempting to perform a to_char function on a char variable.

we can solve it by either remove the single quotes from the inline view
DECLARE

CURSOR c1 IS
SELECT TO_CHAR(NVL(a.foo,'0'),'999')
FROM
(SELECT 0 foo FROM dual) a;
BEGIN
NULL;

END;

or
convert a.foo to a number via the to_number function:

DECLARE

CURSOR c1 IS
SELECT TO_CHAR(NVL(TO_NUMBER(a.foo),'0'),'999')
FROM
(SELECT '0' foo FROM dual) a;
BEGIN
NULL;

END;
That's all from us, hope this help.

Thursday, November 28, 2013

How to resolve can't mount backup path in android recovery



Sometimes, when we want to backup rom using CWM we get error message "can't mount backup path" in android recovery. This post will discuss about how to resolve can't mount backup path in android recovery.

To resolve error "can't mount backup path" in android recovery, do this steps below :

  1. Enter in normal mode
  2. Go to menu Setting > Storage > Erase SD Card
  3. Shutdown your android and Enter in recovery mode
  4. Do backup your rom

Monday, November 18, 2013

How to upgrade evaluation version of windows server 2012

windows server 2012 standard

Most evaluation versions can be converted to full retail versions, but the method varies slightly depending on the edition. This post will discuss about How to upgrade evaluation version of windows server 2012.

Before you attempt to convert the version, verify that your server is actually running an evaluation version. To do this, do either of the following:
  1. From an elevated command prompt, run slmgr.vbs /dlv; evaluation versions will include “EVAL” in the output.
  2. From the Start screen, open Control Panel. Open System and Security, and then System. View Windows activation status in the Windows activation area of the System page. Click View details in Windows activation for more information about your Windows activation status.
  3. From an elevated command prompt, determine the current edition name with the command DISM /online /Get-CurrentEdition or DISM /online /Get-TargetEditions. Make note of the edition ID, an abbreviated form of the edition name. 
  4. Then run DISM /online /Set-Edition:<edition ID> /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula, providing the edition ID and a retail product key. The server will restart twice.

How to autoshutdown windows in spesific tiime


You can schedule task to shutdown at specific time, follow steps below to schedule autoshutdown task:

  1. Go to Start > Control Panel > System and Security > Administrative Tools and click on the Task Scheduler.
  2. From the Action menu in Task Scheduler, click "Create Basic Task..."
  3. In the "Create Basic Task Wizard" windows that pops up, Type in a title and a description. Something basic like "PC Shutdown."
  4. Click "Next."
  5. On the "Task Trigger" screen, choose the frequency with which you want the Shutdown PC to run. For nightly shutdown, click on "daily" and click the Next" button.
  6. On the "Daily" screen, enter the date and time you want your PC to shutdown. Click "Next." 
  7. On the "Action" screen, choose "Start a program" and click "Next."
  8. On the "Start a Program" screen, type C:\Windows\System32\shutdown.exe in the "Program/script" text field.
  9. In the Add arguments text field type /s.
  10. Click "Next."
  11. Confirm your settings on the Summary screen and click "Finish."
Now your Windows computer will automatically shutdown at the same time every day/night.

Thursday, November 14, 2013

How to use vlookup in excel

VLOOKUP is one of Excel most useful functions, and it’s also one of the least understood.  In this article, we will discuss about how to use VLOOKUP in excel. So what is VLOOKUP?  Well, of course it’s an Excel function.  This article will assume that the reader already has a passing understanding of Excel functions, and can use basic functions such as SUM, AVERAGE, and TODAY. In its most common usage, VLOOKUP is a database function, meaning that it works with database tables – or more simply, lists of things in an Excel worksheet.  What sort of things?   Well, any sort of thing.  You may have a worksheet that contains a list of employees, or products, or customers, or CDs in your CD collection, or stars in the night sky.  It doesn’t really matter. To use VLOOKUP you can follow this steps below :
  1. Go to Formulas > Insert Function
  2. Type VLOOKUP and click GO and click OK

  3. In window :
    Lookup value choose Field that you want to be looked.
    Table Array choose Reference table from where the value will be looked
    Col Index Num choose field index of table column from where the value will be generated
    Range Lookup True it will use exact match, False for closest match

  4. Press OK

Wednesday, November 13, 2013

How to replace string in power builder

In this post we will discuss about how to replace string in power builder using our custom routine. This routine works generically for any string.

For example, if old_str = "red" and new_str = "green", all occurrences of "red" inside of mystring will be replaced with "green".

Here is the script :

long ll_StartPos = 1

ll_StartPos = Pos(arg_str, arg_search, ll_StartPos)

DO WHILE ll_StartPos > 0

arg_str = Replace(arg_str, ll_StartPos, Len(arg_search), arg_replace)
ll_StartPos = Pos(arg_str, arg_search, ll_StartPos + Len(arg_search))

LOOP

return arg_str

Tuesday, November 12, 2013

How to create tablespace in oracle

There are some types of tablespace in oracle. This post will discuss about how to create tablespace in oracle using syntax.

  1. Permanent Tablespace
    create tablespace ts_test
    logging
    datafile '/datafiles/ts_test.dbf'
    size 32m
    autoextend on
    next 32m maxsize 2048m
    extent management local;
  2. Temporary Tablespace
    create temporary tablespace temp_test
    tempfile '/datafiles/temp_test.dbf'
    size 32m
    autoextend on
    next 32m maxsize 2048m
    extent management local;
  3. Undo Tablespace
    create undo tablespace ts_undo
    datafile '/datafiles/undo.dbf'
    size 100M;
  4. More than one datafile
    create tablespace ts_test
    datafile '/datafiles/test_01.dbf' size 4M autoextend off,
    '/datafiles/test_02.dbf' size 4M autoextend off,
    '/datafiles/test_03.dbf' size 4M autoextend off
    logging
    extent management local;

Monday, November 11, 2013

How to install .net framework 3.5 in windows server 2012

If you want to install .NET Framework 3.5 in windows server 2012, you will most likely see this error message when installing the feature:

“Do you want to specify an alternate source path? One or more installation selections are missing source files…”


To solve this, you can follow this steps :
  1. Go to a command prompt and enter this:
    dism /online /enable-feature /featurename:NetFX3 /all /Source:d:\sources\sxs /LimitAccess
    Note: Source should be the Windows installation disc. In my case, this was located on D:
  2. Go down to “Specify an alternate source path” and enter “d:\sources\sxs” as the path.
  3. Now you can install .net framework on your windows 2012 server

Saturday, November 9, 2013

How to show prompt dialog in delphi


In this post we will discuss about How to show prompt dialog in delphi that will ask user to input some string to be processed. In delphi we can use inputbox function.

The InputBox function displays a simple dialog box with the given Caption and Prompt message. It asks the user to enter data in a text box on the dialog. A Default value is displayed in the text box.

If the user presses OK, the default or user entered data is stored in the return string, otherwise an empty string is returned.

If the user cancels the dialog, then the return value is the default string.

The script below are the sample of inputbox function usage :

var
  value : string;

begin
  // Keep asking the user for their town
  repeat
    value := InputBox('Name', 'Please type your name', 'Robert');
  until value <> '';

  // Show their name
  ShowMessage('Your name is '+value);
end;

Friday, November 8, 2013

How to Add Paging Widget For Blogger

In this post we will provide you tips to add page navigation for your blogger blog. Blogger default navigation shows only Older Posts and Newer Posts, many blogger want to change this into numbered page navigation.

In this post We will discuss step by step the guide of how to add paging widget to replace the blogger old navigation. 

How to Add Paging Widget For Blogger



Follow the steps below  on How to Add Paging Widget For Blogger :
  1. Log in into Blogger Dashboard
  2. Go to Layout and click on Add a Gadget link.
  3. Select HTML/JavaScript from list.
  4. Copy and paste below code into box :
    <style type="text/css">
    #blog-pager {
      height: 28px;
      padding: 10px 0 0;
      overflow: hidden;
      text-align: center;
    }
    
    .showpageArea a {
      text-decoration: underline;
      font-size: 16px;
      text-align: center;
    }
    
    .showpageNum a {
      font-size: 16px;
      text-decoration: none;
      border: 1px solid #cccccc;
      margin: 0 5px;
      padding: 5px;
    }
    
    .showpageNum a:hover {
      border: 1px solid #cccccc;
      background-color: #cccccc;
    }
    
    .showpagePoint {
      font-size: 16px;
      text-decoration: none;
      border: 1px solid #cccccc;
      background: #216FD9;
      margin: 0 5px;
      padding: 5px;
      color: #ffffff;
    }
    
    .showpageOf {
      text-decoration: none;
      padding: 5px;
      margin: 0 5px;
    }
    
    .showpage a {
      text-decoration: none;
      border: 1px solid #cccccc;
      padding: 5px;
    }
    
    .showpage a:hover {
      text-decoration: none;
      background: #cccccc;
    }
    
    .showpageNum a:link,.showpage a:link {
      text-decoration: none;
      color: #333333;
    }</style>
    <script>
        var pageCount = 7;
        var displayPageNum = 5;
        var upPageWord = "Previous";
        var downPageWord = "Next";
    </script>
    <a href="http://www.haakblog.com/" style="font-size: 0pt;">Blogger Widgets</a>
    <script src="http://netoopscodes.googlecode.com/svn/netoops-page-nav-v2.js"></script>
    
    
  5. You can changed number of page count with replace 3 as your required and for change display of page number change 5 as your requirement.
  6. Click on Save Button.
  7. In layout arranged this widget to below blog post widget.

Thursday, November 7, 2013

How to Add Facebook Fan Page Widget In Blogger

Facebook is the biggest way to promote your blog because almost everyone uses facebook. Many ways to promote your blog on facebook and facebook fan page is one of them. You can create facebook fan page for your blog or website and increase like for your fan page.
You can easily add your fan page like box widget on your blogger blog. In this post we will discuss  about How to Add Facebook like Box Widget for Blogger. 

Add Facebook Fan Page Widget

Here are the step to Add Facebook Fan Page Widget :
  1. Log in into Blogger Dashboard and Go to Layout then click on Add a Gadget link.
  2. Add HTML/JavaScript
  3. Insert below code into box
    [iframe allowtransparency="true" frameborder="0" scrolling="no" src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2
    FIlkomerss&width=240&
    height=190&show_faces=true&
    amp;stream=false&header=false&show_border=false" style="border: none; height: 200px; overflow: hidden; width: 250px;"][/iframe]
    

  4.  Change Ilkomerss to your facebook page name. You can also change Width and Height as your requirement.
  5. Click on save button.

Wednesday, November 6, 2013

How to resolve error Msg 468 : Cannot resolve collation conflict in SQL Server

If you've ever worked with SQL Server you've probably encountered an error like this: 

Msg 468, Level 16, State 9, Line 1
Cannot resolve collation conflict between 'Latin1_General_CI_AS' and 'SQL_Latin1_General_CP1_CI_AS' in equal to operation.

This error is cause by having different collation settings for the columns in the comparison. SQL Server cannot reliably resolve how the columns should be compared to determine if they meet your conditions. For example, when you compare two columns that are both case-sensitive (Latin1_General_CS_AS) then 'AA' = 'AA', but 'Aa' != 'AA'. On a case-insensitive collation 'Aa' = 'AA'.
Where code pages change, or the case or accent sensitivity changes, SQL Server may require you to specify which collation is to be used during comparison.

In this case the error was caused by a comparison of two columns in a join clause where the source tables were from databases with different collations.
Resolving the error is as simple as adding the COLLATE codepage keyword after the column. You can figure out which is the offending column and change its collation, or change both columns to the same collation.

-- Example COLLATE Fix for a JOIN condition
SELECT
   TableA.col1,
   TableB.col2
FROM TableA
INNER JOIN TableB
ON TableA.col3  COLLATE Latin1_General_CI_AS = TableB.col3 COLLATE Latin1_General_CI_AS

-- Example COLLATE Fix for a WHERE condition
SELECT
   TableA.col1
FROM DatabaseA.dbo.TableA, dbo.TableB
WHERE TableA.col3 COLLATE Latin1_General_CI_AS = Max(TableB.col2)


-- Example COLLATE Fix for a WHERE IN condition
SELECT
   TableA.col1
FROM TableA
WHERE TableA.col3 COLLATE Latin1_General_CI_AS IN (SELECT TableB.col1 FROM TableB)

You can check the collation setting for a column using the sp_help TableName command.

Friday, November 1, 2013

How to add code block in blogger

It is good to have a code area in your blogger posts if you want to write down code, blogger widgets, blogger templates or it deals with any kind of blog customization. It will become easy for anybody to locate the html code and easily copy and paste the code for using it. It will also give a well organised look to your blog posts.
To add code block in blogger, read and follow the steps below :
  1. Log in to your blogger account. Go to Dashboard >> Template.

  2. Click on the Customize.

  3. GO to Advanced >> Add CSS.

  4. Copy and Paste the following code in the Add CSS section.
    .code {
        background: #f5f8fa;
        background-repeat: no-repeat;
        border: solid #5C7B90;
        border-width: 1px 1px 1px 20px;
        color: #000000;
        font: 13px 'Courier New', Courier, monospace;
        line-height: 16px;
        margin: 10px 0 10px 10px;
        max-height: 200px;
        min-height: 16px;
        overflow: auto;
        padding: 28px 10px 10px;
        width: 90%;
    }
    
    .code:hover {
        background-repeat: no-repeat;
    }
  5. Now when you are composing new post, select HTML section and paste the following code.
    your code here
  6. Continue your writing and publish
Don't Forget To Join Our Community
×
Widget