RSS
 

Archive for the ‘English’ Category

Check domain availability in a safe way

06 Dec

Many domain whois checker sites log the domain names and sell it to the 3rd parties.

So the safest way to check the domain name availability, is doing it from your computer! No logging, no need to be paranoid :)

For Windows:

Open Command Prompt Run nslookup -type=ns domain.com, if it lists the nameservers, domain is not available

For Linux, *BSD or Mac OS X:

Just run whois domain.com

Social Share Toolbar
 
 

Banking Terms Acronyms

06 Nov
LC   : Letter of Credit
LG     : Letter of Guarantee
SME    : Small and Medium Enterprises
SBB    : Small Business Banking
RTL    : Retail
NPL    : Non Performing Loans
LCY    : Local Currency
FCY    : Foreign Curreny
NII    : Net Interest Income
YTD    : Year to Date
RM     : Relationship Manager
PN     : Promissory Note
ROA    : Return On Assets
ROE    : Return On Equity
IEA    : Interest Earning Assets
OPEX : Operating Expenses
CAPEX: Capital Expenditure
Social Share Toolbar
 

MS SQL Server sp_MSforea​chdb usage

07 Oct

This is a system SP for looping a command in all databases in a server.

Question mark is used for DB name.

Following query selects DB name and the number of tables of each DB;

DECLARE @command VARCHAR(1000) 
 
SELECT @command = 'USE ? select ''?'', count(1) from sysobjects where xtype = ''U'''
--U for tables, V for views
 
EXEC sp_MSforeachdb @command
Social Share Toolbar
 

Search for special characters (eg. percent sign) with LIKE in SQL Server

24 Jul

Percent sign is used any number & any character with LIKE search. Today I needed to search a text which has a percent sign (%)

The text I want to search: “1980%”

SELECT * FROM MY_TABLE WHERE MY_COLUMN LIKE '%1980[%]%'

One more thing, underscore sign (_) is used to search any “1″ character with LIKE.

SELECT * FROM MY_TABLE_ WHERE MY_COLUMN LIKE '%MEM_T%'

Returns:

 MEMET

MEMATİ

Social Share Toolbar
 

Disable / Enable Index

24 Jul

Indexes are useful when reading data. But when inserting data into a table, it may be useful to disable the indexes and rebuild them again after insert operation completed.

Especially when loading huge data manually or with ETL, disable index on pre-sql and rebuild on post-sql:

----Diable Index
ALTER INDEX [IX_Index_Name] ON dbo.TABLE_NAME DISABLE
----Enable Index
ALTER INDEX [IX_Index_Name] ON dbo.TABLE_NAME REBUILD
Social Share Toolbar
 

Dependency list of a table

15 Jun

List of the dependent objects on a table…

SELECT OBJECT_NAME(sd.object_id) AS ObjName
FROM sys.sql_dependencies sd
LEFT JOIN sys.objects o ON o.object_id=sd.object_id
LEFT JOIN sys.COLUMNS c ON c.object_id=sd.referenced_major_id AND
c.column_id=sd.referenced_minor_id
WHERE o.TYPE='V' --Remove this to list all dependent objects
      AND OBJECT_SCHEMA_NAME(sd.referenced_major_id) = 'dbo'
      AND sd.referenced_major_id=object_id('THE_TABLE')
      AND c.name='THE_COLUMN' --Comment this row to list dependencies of the table, not only column
GROUP BY schema_name(o.schema_id),OBJECT_NAME(sd.object_id)
Social Share Toolbar
 

Resize many pictures at once (for Windows)

11 Jun

This little exe is really very useful… Please see the screenshots below, and download it here

 

 

 

 

 

 

 

 

 

 

 

Social Share Toolbar
 
No Comments

Posted in English

 

Oracle/PLSQL & Informatica To_Char Function

13 Mar

The to_char function converts a number or date to a string.

The syntax for to_char function is: to_char( value, [ format_mask ], [ nls_language ] )

Date Examples

Parameter Explanation
YEAR Year, spelled out
YYYY 4-digit year
YYY
YY
Y
Last 3, 2, or 1 digit(s) of year.
IYY
IY
I
Last 3, 2, or 1 digit(s) of ISO year.
IYYY 4-digit year based on the ISO standard
Q Quarter of year (1, 2, 3, 4; JAN-MAR = 1).
MM Month (01-12; JAN = 01).
MON Abbreviated name of month.
MONTH Name of month, padded with blanks to length of 9 characters.
RM Roman numeral month (I-XII; JAN = I).
WW Week of year (1-53) where week 1 starts on the first day of the year and continues to the seventh day of the year.
W Week of month (1-5) where week 1 starts on the first day of the month and ends on the seventh.
IW Week of year (1-52 or 1-53) based on the ISO standard.
D Day of week (1-7; 1 = Sunday).
DAY Name of day.
DD Day of month (1-31).
DDD Day of year (1-366).
DY Abbreviated name of day.
J Julian day; the number of days since January 1, 4712 BC.
HH Hour of day (1-12).
HH12 Hour of day (1-12).
HH24 Hour of day (0-23).
MI Minute (0-59).
SS Second (0-59).
SSSSS Seconds past midnight (0-86399).
FF Fractional seconds.
Social Share Toolbar
 

SQL Server “SELECT * FROM” Keyboard Shortcut

20 Oct

Think that how many times you write “SELECT * FROM” a day.

You can select data from a table with one key Ctrl+5

Let’s create an SP under master DB. If this SP is under master DB, we can use shortcut property in all DBs.

USE master
 
CREATE proc sp_select
@TABLE_NAME VARCHAR(100),
@COUNT VARCHAR(10) = NULL
AS
BEGIN
 IF EXISTS (SELECT NULL FROM sys.objects WHERE TYPE IN ('U','V') AND name=@TABLE_NAME)
 BEGIN
  IF @COUNT IS NULL
   SET @COUNT=1000
  EXEC('select top ' + @COUNT + ' * from ' + @TABLE_NAME + '(nolock)')
 END
 ELSE
  print 'Table not found.'
END
GO

bbb

SP is created, now we have to assign shortcut to this Stored Procedure; Tools > Options > Environment > Keyboard

We assigned “Ctrl+5” to sp_select as seen in the picture above.

Now, just write table or view name, select the text and hit Ctrl+5.

MY_TABLE_NAME --Selects TOP 1000

or

MY_TABLE_NAME, 50 --Selects TOP 50
Social Share Toolbar
 

Informatica Executive Vice President Girish Pancha and Me

14 Oct

Yesterday I met Mr. Pancha at Corporate Data Management Event in Istanbul which is sponsored by Informatica, Komtaş and Ereteam.

Social Share Toolbar