June 6, 2012 at 11:38 am
i am concatenating the string , date with arabic column
but string and arabic not concatenating
through the below qry
/******************
select convert(nchar,Subject_Name_English,160)+nchar(8207) +
+ convert(nvarchar,Subject_Name_Arabic,160) collate SQL_Latin1_General_CP1_CI_AS
+(Subject_Previous_Name_English) +
(Subject_Previous_Name_Arabic) +
convert(nvarchar,rtrim(ltrim(convert(nvarchar,Subject_Date_of_Registration,101))),130)
as Subject_Date_of_Registration
from XXXXXX
table and column are in same collation
SQL_Latin1_General_CP1_CI_AS
but the date and arabic overrided.
29?????????????May-2012
take ???? as arabic letters
June 6, 2012 at 2:28 pm
balaji.k.ramanar (6/6/2012)
i am concatenating the string , date with arabic columnbut string and arabic not concatenating
through the below qry
/******************
select convert(nchar,Subject_Name_English,160)+nchar(8207) +
+ convert(nvarchar,Subject_Name_Arabic,160) collate SQL_Latin1_General_CP1_CI_AS
+(Subject_Previous_Name_English) +
(Subject_Previous_Name_Arabic) +
convert(nvarchar,rtrim(ltrim(convert(nvarchar,Subject_Date_of_Registration,101))),130)
as Subject_Date_of_Registration
from XXXXXX
table and column are in same collation
SQL_Latin1_General_CP1_CI_AS
but the date and arabic overrided.
29?????????????May-2012
take ???? as arabic letters
It is very unclear what you are trying to do here. There are several issues with the query you posted. You are converting certain columns to nchar and nvarchar but you don't define the size. Do you know what the default length is for these? I certainly don't. You should specify a size for character data. Also you are converting to nchar and nvarchar with a style of 160. I am not familiar with that style but since you are converting to characters what is this supposed to do?
If you want some real help with your issue you need to provide some details. A clear explanation of what you are trying to do, ddl, sample data, and desired output. Look at the first link in my signature for best practices when posting questions.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply