Click here to Skip to main content
15,885,546 members
Home / Discussions / Database
   

Database

 
AnswerRe: Performance Issue Pin
Mycroft Holmes2-Jul-08 21:17
professionalMycroft Holmes2-Jul-08 21:17 
GeneralRe: Performance Issue Pin
sujithkumarsl3-Jul-08 0:48
sujithkumarsl3-Jul-08 0:48 
QuestionSQL Server Trigger Pin
irusul1-Jul-08 9:48
irusul1-Jul-08 9:48 
AnswerRe: SQL Server Trigger Pin
Giorgi Dalakishvili1-Jul-08 10:14
mentorGiorgi Dalakishvili1-Jul-08 10:14 
AnswerRe: SQL Server Trigger Pin
Mycroft Holmes1-Jul-08 14:06
professionalMycroft Holmes1-Jul-08 14:06 
AnswerRe: SQL Server Trigger Pin
TheFM2342-Jul-08 4:29
TheFM2342-Jul-08 4:29 
GeneralRe: SQL Server Trigger Pin
Mycroft Holmes2-Jul-08 21:22
professionalMycroft Holmes2-Jul-08 21:22 
QuestionStore Procedure Pin
brettokumar1-Jul-08 1:43
professionalbrettokumar1-Jul-08 1:43 
hi i am using a store procedure for passing number of value and using two parameter

one is value and another one is id

use to update table

my store procedure like below coding but this store procedure is created but when i am execute this sp it display error like this :

Conversion failed when converting the varchar value '1,2,7,8,12' to data type int.

my coding is like:

set ANSI_NULLS ON

set QUOTED_IDENTIFIER ON

go

ALTER procedure [dbo].[sp_txtSplit_Summa1](@sp_Visible varchar(1000), @sp_CRID Varchar(100), @sp_Delimiter char(1)=',')

as

begin

set nocount on

declare @Item varchar(1000)

declare @ItemID varchar(100)

while (charIndex(@sp_Delimiter,@sp_Visible,0)<>0 and charIndex(@sp_CRID,@sp_Visible,0)<>0)

begin

select

@Item= rtrim(ltrim(substring(@sp_Visible,1,CharIndex(@sp_Delimiter,@sp_Visible,0)-1))),

@ItemID=rtrim(ltrim(substring(@sp_CRID,1,CharIndex(@sp_Delimiter,@sp_CRID,0)-1))),

@sp_Visible=rtrim(ltrim(substring(@sp_visible,charindex(@sp_delimiter,@sp_Visible,0)+1,len(@sp_Visible)))),

@sp_CRID=rtrim(ltrim(substring(@sp_visible,charindex(@sp_delimiter,@sp_CRID,0)+1,len(@sp_CRID))))

if len(@Item)>0

select (@item)

select (@ItemID)

update summa1 set age= (select @Item ) where sno= (select @ItemID )

end

if len(@sp_Visible)>0

update summa1 set age= (select @sp_Visible) where sno= (select@sp_CRID)

select (@item)

select (@ItemID)

select * from summa1

return

end

--CAST(CAST(@myval AS varbinary(20)) AS decimal(10,5))

exec sp_txtSplit_Summa1 '21,22,333,444,555','1,2,7,8,12',','

with regards,
bretto

AnswerRe: Store Procedure Pin
SomeGuyThatIsMe1-Jul-08 2:57
SomeGuyThatIsMe1-Jul-08 2:57 
QuestionHelp In Query Pin
Saiyed Alam1-Jul-08 1:06
Saiyed Alam1-Jul-08 1:06 
AnswerRe: Help In Query Pin
SomeGuyThatIsMe1-Jul-08 3:09
SomeGuyThatIsMe1-Jul-08 3:09 
GeneralRe: Help In Query Pin
Saiyed Alam1-Jul-08 5:27
Saiyed Alam1-Jul-08 5:27 
QuestionConnection: login failed - State 16 Pin
DharperII1-Jul-08 0:52
DharperII1-Jul-08 0:52 
QuestionSql server replication (from 2000 to 2005) Pin
acodman30-Jun-08 23:49
acodman30-Jun-08 23:49 
QuestionReporting Services - Controlling number of rows of a table control Pin
Rashmi Deshpande30-Jun-08 23:47
Rashmi Deshpande30-Jun-08 23:47 
Questionsql query Pin
Pankaj Garg30-Jun-08 21:25
Pankaj Garg30-Jun-08 21:25 
AnswerRe: sql query Pin
Giorgi Dalakishvili30-Jun-08 21:27
mentorGiorgi Dalakishvili30-Jun-08 21:27 
GeneralRe: sql query Pin
Pankaj Garg30-Jun-08 21:31
Pankaj Garg30-Jun-08 21:31 
GeneralRe: sql query Pin
Giorgi Dalakishvili1-Jul-08 4:20
mentorGiorgi Dalakishvili1-Jul-08 4:20 
AnswerRe: sql query Pin
TheFM2342-Jul-08 3:43
TheFM2342-Jul-08 3:43 
QuestionHow to get the second occuring of a row Pin
Exelioindia30-Jun-08 4:09
Exelioindia30-Jun-08 4:09 
AnswerRe: How to get the second occuring of a row Pin
SomeGuyThatIsMe30-Jun-08 8:39
SomeGuyThatIsMe30-Jun-08 8:39 
Questionconnecting to remote sql server Pin
kadkir30-Jun-08 3:48
kadkir30-Jun-08 3:48 
AnswerRe: connecting to remote sql server Pin
rrrriiizz2-Jul-08 19:37
rrrriiizz2-Jul-08 19:37 
QuestionSQL Server 2008 Express Pin
Brendan Vogt30-Jun-08 3:26
Brendan Vogt30-Jun-08 3:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.