Skip to main content

Posts

Showing posts from January, 2014

Autonumber in select statement in SQL Server

Dear Friends
You can identify the autonumber with SQL query through  ROW_NUMBER:

Here is a query

SELECT ROW_NUMBER() OVER (ORDER BY col1) AS rn, * FROM tbl1
To filter the results based on the row number use this:

SELECT * FROM
(
    SELECT ROW_NUMBER() OVER (ORDER BY col1) AS rn, * FROM tbl1
) T1
WHERE rn = 5

I hope it will help you

Regards
Rashid Imran Bilgrami
http://www.bestvisualization.com

Import Arabic Content From external file Maillist King / Send a blaster Email Program

Dear All
If you are facing a problem to import unicode language character  like arabic, russian, german or any other (like ????) during importing the user list and sending email in sendblaster email program or maillist king program then flow the below step to get rid of this issue


To solve this sort of encoding problems, simply make sure your language is used both for codepage and for number / dates format. Display language is not relevant.
In short, please follow these basic instructions:

Open Windows Control Panel, Regional and Language Options, and make sure that

1) in “Format” tab, the format for numbers and dates is set to your language (for example Arabic) – not to English or any other language.

2) In “Advanced” (WinXP) or “Administrative” (Vista, Win7) tab, the “Language for non-Unicode programs” is set to your language (for example Arabic). Changing this will require re-starting your PC.

Finally, when you compose your message, choose Unicode charset and make some tests composi…

How to use left, right & substring in SQL with String Dynamic Length

Dear Reader
Here is an example for how to use Left, right and substring function in SQL

Using Right with Reverse String
SELECT RIGHT([String],CHARINDEX('%',REVERSE([String]),0)-1)

Using Left with String
select Left([String],CHARINDEX('%',[String],0)-1)

Using SubString with String
select Substring([String],0,CHARINDEX('%',[String],0))

Regards
Rashid Imran Bilgrami
http://www.bestvisualization.com