How To split The data ?????????????? in Sql??????????

Posted by Sabarimahesh under Sql Server on 4/2/2012 | Points: 10 | Views : 1954 | Status : [Member] | Replies : 15
Start Sp

declare Var1 int
Declare Var2 int
Decalre var3 int

set Var1=1
set Var2=3
set Var3=Var1+Var2
Return Var3
End Sp


How to Split The Var3 Value in Another Sp.....


Very urgent ...

Plz Help Me

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M



Responses

Posted by: Self-Innovator on: 4/2/2012 [Member] Bronze | Points: 25

Up
0
Down
Refer this based on your special character split the values...
http://www.dotnetfunda.com/codes/code1877-use-of-charindex-in-sql.aspx

Join Hands Change lives
Thanks & Regards
Straight Edge Society

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajni.Shekhar on: 4/2/2012 [Member] Bronze | Points: 25

Up
0
Down
check below link:

http://www.dotnetfunda.com/codes/code2165-split-a-string-using-sql-function.aspx

Thanks,
Rajni Shekhar

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/3/2012 [Member] Bronze | Points: 25

Up
0
Down
Rajni.Shekhar

What About fnslipt() Funtion ... Do you know about it


Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/3/2012 [Member] Bronze | Points: 25

Up
0
Down
Self-Innovator

Any other .... ur Own example

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Self-Innovator on: 4/3/2012 [Member] Bronze | Points: 25

Up
0
Down
What is the Statement u need to split....Pls specify ur problem little bit briefly...

Join Hands Change lives
Thanks & Regards
Straight Edge Society

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajni.Shekhar on: 4/3/2012 [Member] Bronze | Points: 25

Up
0
Down
fnslipt() or fnSplit() sorry do not have any idea, need to check about it.

Thanks,
Rajni Shekhar

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/3/2012 [Member] Bronze | Points: 25

Up
0
Down
Rajni.Shekhar

Sorry

i typed wrong

fnSplit()

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Self-Innovator on: 4/3/2012 [Member] Bronze | Points: 25

Up
0
Down
Start Sp

declare Var1 int
Declare Var2 int
Decalre var3 int

set Var1=1
set Var2=3
set Var3=Var1+Var2
Return Var3 // return var 3 from sp as an Output Parameter...
End Sp

the u can go ahead for another sp passing the same value of Var3 as a parameterthe use some splitting mechanism to split the values...

Join Hands Change lives
Thanks & Regards
Straight Edge Society

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/3/2012 [Member] Bronze | Points: 25

Up
0
Down
Self-Innovator

if i store the two variables value in single variable

Example var1+var2
var1~var2
var1>var2

i need to split this variables(var1,var2) and symbol in another stored procedure





Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajni.Shekhar on: 4/3/2012 [Member] Bronze | Points: 25

Up
0
Down
we do not have any system function like fnSplit(), we need to create it in our db and use it where ever you want.

as per my knowledge,yes you can split it, i have written a code in code section, i have provided you a link of dot net funda code section.

pas var3 and delimetor like '~' or '#' or '+' or any delimator. i suggest not to use + sign to concatenate.

Thanks,
Rajni Shekhar

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: CS1401 on: 4/3/2012 [Member] Starter | Points: 25

Up
0
Down
Friend, you can't split integer(var3) until u didn't pass var1 and var2 to another sp. try to concatenate var1 and var2 as a string and converted it to int in another sp afterwards u can add.

...

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/3/2012 [Member] Bronze | Points: 25

Up
0
Down

Rajni.Shekhar
http://geekswithblogs.net/AngelEyes/archive/2007/04/12/111504.aspx

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/3/2012 [Member] Bronze | Points: 25

Up
0
Down
i seen in that link

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/3/2012 [Member] Bronze | Points: 25

Up
0
Down
CS1401
Ho! thanks


Hi Do you have Code...

Can you Post to me

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/3/2012 [Member] Bronze | Points: 25

Up
0
Down
Self-Innovator

ya i have the idea...

I dono How to use Split Function

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response