.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

How to Insert rs 2,50,000 as 250000 into database from front end

Posted By: Naresh     Posted Date: November 16, 2010    Points:2   Category :ASP.Net
Hi All,


I have the string in format of Rs.2, 50,000. Now I want to read the string value as 250000 and insert into database.Ca u send me code to remove commas.

Responses
Author: Suresh             
Posted Date: November 16, 2010     Points: 5   

Hello Naresh,
Kindly try below type. You will get exact result.

Declare @str varchar(50)
Declare @str1 int
Set @str='2,50,000'
Set @str1=Replace(@str,',','')
Select @str1


Let Me know that, do you need any further clariffication

Author: Naresh             
Posted Date: November 16, 2010     Points: 5   

Hi,


My string is like this RS 2,50,000.

Author: Suresh             
Posted Date: November 16, 2010     Points: 5   

Declare @str varchar(50)
Declare @str1 int
Set @str='2,50,000' --This is ur string Part

Set @str1=Replace(@str,',','')
Select @str1



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend