locked
How can i store other language content to English in SQLSERVER RRS feed

  • Question

  • User370196378 posted

    Hi all

        Please suggest me regarding following issue.

      Is there any way by which i can store the any other language  content in enlish inside the SQLSERVER.

     Like  i want to store बहन (बहन is Hindi Word  bahan in english )  so is there any way  to convert and store in sqlserver .

     i am using C#,ASP.net and SQLSERVER .

     

    Please suggest me best possible way.

    Saturday, November 1, 2008 6:40 AM

Answers

  • User-611445092 posted

     Hi Gautam,

         You can search the test as shown below:

    Create table Test_Nchar (strText nvarchar(max))

    insert into Test_Nchar values ( N'बहन')
    insert into Test_Nchar values ( N'Sridhar')

    SELECT * FROM Test_Nchar WHERE strText LIKE N'बह%'

    Please note that we are searching according to the language stored in the column.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, November 2, 2008 11:32 PM

All replies

  • User2002217640 posted

    I dont think it is available because this is not part of translation, please post if you get a solution anywhere.

    Saturday, November 1, 2008 7:34 AM
  • User1281381861 posted

    Hi,gautam2u@gmail.com

    You Can Do that In this Way

     

     

    Create table Test_Nchar

    (strHindi nvarchar(max))

    insert into Test_Nchar values ( N'बहन')

     

     

     

     

    PLZ MARK AS ANSWER IF IT HELP U.

    THANKS.

    Saturday, November 1, 2008 1:32 PM
  • User-611445092 posted

     Hi Gautham,

         I dont think there are any tools to convert hindi to english according to your requirement.

    Instead of the conversion you can directly store hindi characters as it is into the database.

    Sunday, November 2, 2008 1:14 AM
  • User370196378 posted

     Hi ksridharbabuus

     I can store  hindi text  in sqlserver but problem with searching any word .

    Sunday, November 2, 2008 10:56 PM
  • User-611445092 posted

     Hi Gautam,

         You can search the test as shown below:

    Create table Test_Nchar (strText nvarchar(max))

    insert into Test_Nchar values ( N'बहन')
    insert into Test_Nchar values ( N'Sridhar')

    SELECT * FROM Test_Nchar WHERE strText LIKE N'बह%'

    Please note that we are searching according to the language stored in the column.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, November 2, 2008 11:32 PM
  • User-1335073632 posted

    using nvarchar, nchar it's working.
    It also requires to prefix data with N.
    I have tried this in sql server 2005 management studio.
    But how i can use N (as prefix to data) when sending data from controls in SQL from vb.net application?

    Wednesday, February 4, 2009 10:56 PM
  • User-324347033 posted
    Hi there, THis is the tip which u have told by using a simple query. I am working on a project which uses gujarati language to be used as a data in the database. Also I am not using a simple text query But I am using a stored procedure insert data in the database, which is as follows... set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go -- ============================================= -- Author: <Sohil Vohra> -- Create date: <25-05-2009> -- Description: <Manipulating Thought Master> -- ============================================= ALTER PROCEDURE [dbo].[sp_ThoughtMaster] @Mode varchar(30), @ThoughtId numeric(18) =0, @Thought nvarchar(max)='', @UpdateDate datetime = getdate, @InsertDate datetime = getdate, @status smallint =1 AS BEGIN SET NOCOUNT ON; -- Condition : Inserting data IF(@Mode='ADD') BEGIN INSERT INTO ThoughtMaster ( Thought, InsertDate, UpdateDate, status ) VALUES ( @Thought,@InsertDate, @UpdateDate, @status ) END -- Condition : Updating Data ELSE IF(@Mode='UPDATE') BEGIN UPDATE ThoughtMaster SET Thought=@Thought, UpdateDate=@UpdateDate, status=@status WHERE ThoughtId = @ThoughtId END -- Condition : Deleting data ELSE IF(@Mode='DELETE') BEGIN -- deleting songs of corresponding album DELETE FROM ThoughtMaster WHERE ThoughtId = @ThoughtId END END here the field 'thought' is gujarati datatype. when I add 'N' in the @Thought (e.g. when I do 'N@Thought'), it throws me an error which is Msg 128, Level 15, State 1, Procedure sp_ThoughtMaster, Line 28 The name "N@Thought" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted. Please help or reply me at vohrasohilhis@gmail.com. Regards. Sohil Vohra (Microsoft Student Partner) (Government Engg College, Rajkot - Gujarat (INDIA))
    Tuesday, June 16, 2009 4:12 AM
  • User-324347033 posted
    Hi there, THis is the tip which u have told by using a simple query. I am working on a project which uses gujarati language to be used as a data in the database. Also I am not using a simple text query But I am using a stored procedure insert data in the database, which is as follows... set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go -- ============================================= -- Author: -- Create date: -- Description: -- ============================================= ALTER PROCEDURE [dbo].[sp_ThoughtMaster] @Mode varchar(30), @ThoughtId numeric(18) =0, @Thought nvarchar(max)='', @UpdateDate datetime = getdate, @InsertDate datetime = getdate, @status smallint =1 AS BEGIN SET NOCOUNT ON; -- Condition : Inserting data IF(@Mode='ADD') BEGIN INSERT INTO ThoughtMaster ( Thought, InsertDate, UpdateDate, status ) VALUES ( @Thought,@InsertDate, @UpdateDate, @status ) END -- Condition : Updating Data ELSE IF(@Mode='UPDATE') BEGIN UPDATE ThoughtMaster SET Thought=@Thought, UpdateDate=@UpdateDate, status=@status WHERE ThoughtId = @ThoughtId END -- Condition : Deleting data ELSE IF(@Mode='DELETE') BEGIN -- deleting thoughts DELETE FROM ThoughtMaster WHERE ThoughtId = @ThoughtId END END here the field 'thought' is gujarati datatype. when I add 'N' in the @Thought (e.g. when I do 'N@Thought'), it throws me an error which is Msg 128, Level 15, State 1, Procedure sp_ThoughtMaster, Line 28 The name "N@Thought" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted. Please help or reply me at vohrasohilhis@gmail.com. Regards. Sohil Vohra (Microsoft Student Partner) (Government Engg College, Rajkot - Gujarat (INDIA))
    Tuesday, June 16, 2009 5:12 AM
  • User13878136 posted

    "N@Thought" is not permitted
     

    From within SQL you have to pass value of the parameter as

    @thought = N'some nvarchar text here'

    you can't concatenate 'N' to the name of the parameter.

    If you are assigning value of the parameters from .net you have to declare parameter as nvarchar and to assign unicode value to it

    Sorry I do really not know how to do it in .net code, I'm just talking about principles.  I used it from VBscript and had never problem to pass unicode data.

    Could you pass your .net code, someone will help you out of this, I'm sure

     

    Tuesday, June 16, 2009 5:39 AM
  • User1737004839 posted

    how to strore using Linq in SQL server 

    Saturday, November 7, 2009 1:47 AM