DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE
SITE SEARCH SQLUSA.com HEADLINES NEWS
SQL E/BOOKS   SQL 2014 PROGRAMMING   DOWNLOADS
SCRIPTS SQL 2005 SQL 2008 ARTICLES
SQL JOBS TWITTER FORMAT VIDEOS
How to handle Arabic language characters?

Execute the following Microsoft SQL Server T-SQL scripts in Management Studio Query Editor to illustrate the usage of Arabic language characters within an SQL Server database.

USE AdventureWorks2008;
GO
-- SQL Arabic language characters - Arabic collation
-- SQL unicode - nvarchar - 2 bytes per character
CREATE TABLE Sales.ArabicExpress (
  ID              INT    IDENTITY ( 1 , 1 ) PRIMARY KEY,
  FirstName       NVARCHAR(15),
  LastName        NVARCHAR(15),
  Address         NVARCHAR(50),
  City            NVARCHAR(20),
  State           NVARCHAR(4),
  Country         NVARCHAR(20),
  Zipcode         NVARCHAR(10),
  ModifiedDate    DATETIME default(getdate()))
GO
 
INSERT Sales.ArabicExpress(FirstName, LastName, Address, City,
State, Country, Zipcode)
SELECT N'للفلسطينيين', N'بتقديم', N'المشاركين في مؤتمر شرم',
N'حماس', N'وزير', N'الخارجية', N'13663'
GO
 
SELECT * FROM Sales.ArabicExpress
GO
/* Results to TEXT
ID          FirstName       LastName        Address                                            City                 State Country              Zipcode    ModifiedDate
----------- --------------- --------------- -------------------------------------------------- -------------------- ----- -------------------- ---------- -----------------------
1           للفلسطينيين     بتقديم          المشاركين في مؤتمر شرم                             حماس                 وزير  الخارجية             13663      2009-03-02 16:40:05.450
*/
 
-- Microsoft SQL Server unicode encoding of Arabic letters
SELECT            CONVERT(varbinary, left(FirstName,1)),
                  left(FirstName,1)
FROM Sales.ArabicExpress
GO
--0x4406   ل
 
 
-- Cleanup
DROP TABLE Sales.ArabicExpress
GO

 
------------
 
 

Exam Prep 70-461
Exam 70-461
DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE