ورود

View Full Version : alphabetic splitting of data



om1559
پنج شنبه 03 شهریور 1384, 17:19 عصر
Hi all,

I wonder if someone could help me. how can I list information based on their beginning letter?

for example I have a list of names as: Nader, Bagher, Gholi, Taghi, Naghi, Kokab, Zeynab.

I want to list the people whose names begin by a letter between A-M.

is there any instruction in SQL that can help me to split the list of data like that?

Thanks

AminSobati
پنج شنبه 03 شهریور 1384, 17:35 عصر
Dear friend,
Where as this is a Farsi forum, I encourage you to post your questions in Farsi language.
However I assume that Farsi is not your native language!
About the question, you can you use LIKE operator to filter rows based on your desired criteria:
-----
USE Northwind
GO
USE Northwind
GO
SELECT CompanyName,Country
FROM Customers
WHERE Country LIKE '[A-M]%'
ORDER BY Country
-----
Lookup 'LIKE' in SQL Server Books Online.

om1559
پنج شنبه 03 شهریور 1384, 18:38 عصر
salam aziz,

midoonam in farsi forume vali age mikhastam soalam be FENGLISH type konam, baraye hame khana nemishod.
baraye hamin be englisi neveshtam. keyboarde man layout Farsi nadare.

khosh bashid

om1559
پنج شنبه 03 شهریور 1384, 18:38 عصر
dar zemn kheili mamnoon baraye Solution :-)