How to update a table from another table via a 'join update' using column aliases
update
(select a.f falias1, b.f falias2 from a, b where a.id=b.id and a.falias1!=b.falias2 )
set falias1=falias2;
Wednesday, 14 December 2005
Wednesday, 16 November 2005
See number of CPUs in a SUN Solaris box
In a sun solaris box to see the number of CPUS in the box type the following at the prompt.
$/usr/platform/sun4u/sbin/prtdiag -v | more
Thursday, 10 November 2005
Remove ^M from end of each line in Vi
Sometimes you might want to remove a character like '^M' from the end of each line in a vi file. This '^M' character is usually intrduced in the file if you transfer the txt or csv file from a windows environment to unix. It is the extra carriage return introduce in the end of line.
The command to do that is like this in Vi:
but to get the ^M you must press ctrl+v, then ctrl+m on your keyboard when at the vi prompt... it is one of those things
The command to do that is like this in Vi:
:%s/^M//g
but to get the ^M you must press ctrl+v, then ctrl+m on your keyboard when at the vi prompt... it is one of those things
Delete any blank lines in VI
The substitution command in vi to delete any blank lines in Vi editor open the file and type the command below at the VI command prompt.
$v/./d
Convert the entire file's case in VI
Using Vi editor you can convert the entire file to (U) uppercase or
(L) lowercase with the following command.
open the file in Vi and at Vi's command propmt type:
(L) lowercase with the following command.
open the file in Vi and at Vi's command propmt type:
%s/.*/\L&/
Subscribe to:
Posts (Atom)