Click here to Skip to main content
15,888,521 members
Home / Discussions / Database
   

Database

 
AnswerRe: Fetching record that have a particular value in a comma separated value in column Pin
Mycroft Holmes2-May-09 2:56
professionalMycroft Holmes2-May-09 2:56 
GeneralRe: Fetching record that have a particular value in a comma separated value in column Pin
εїзεїзεїз3-May-09 21:07
εїзεїзεїз3-May-09 21:07 
GeneralRe: Fetching record that have a particular value in a comma separated value in column Pin
Mycroft Holmes3-May-09 22:48
professionalMycroft Holmes3-May-09 22:48 
GeneralRe: Fetching record that have a particular value in a comma separated value in column Pin
εїзεїзεїз3-May-09 23:10
εїзεїзεїз3-May-09 23:10 
QuestionSQL Pin
newbie123456789101-May-09 9:04
newbie123456789101-May-09 9:04 
AnswerRe: SQL Pin
David Mujica1-May-09 9:45
David Mujica1-May-09 9:45 
GeneralRe: SQL Pin
newbie123456789101-May-09 9:59
newbie123456789101-May-09 9:59 
Questiongenerate & compare id from table in sql storeprocedure Pin
premprakashbhati30-Apr-09 22:26
premprakashbhati30-Apr-09 22:26 
"select max(centreid) from regionmaster where centreid like '" & intBranchPrefix & "%'", DBConnection, adOpenKeyset, adLockOptimistic 
         If rsMain.RecordCount > 0 Then 
            intID = Mid(rsMain(0), 3, 13) 
        End If 
         intCentreID = intBranchPrefix & (intID + 1) 

this is my sql command in vb6 aplication.here i have to create a storeprocedure of this command which create centreid by taking BranchPrefix from application.i have created a storeprocedure but iam getting an error sayingArgument data type decimal is invalid for argument 1 of substring function.in below storeprocedure Note:i have centreid in table in binary(13,2)


create proc GenerateCentreID @intBranchPrefix varchar(20) 
as  
declare @MaxCentreID bigint,@intID varchar(20)  
set @MaxCentreID=(select convert(bigint,max(substring(centreid,3,13)))  
                  from regionmaster  
                  where centreid like @intBranchPrefix+'%' 
                  )  
  
set @intID=@intBranchPrefix + convert(varchar(13),@MaxCentreID+1) 
select @intID 
  
go  

Questionstored procedure is fast, but slow from code Pin
Meysam Mahfouzi30-Apr-09 20:47
Meysam Mahfouzi30-Apr-09 20:47 
AnswerRe: stored procedure is fast, but slow from code Pin
Henry Minute1-May-09 0:04
Henry Minute1-May-09 0:04 
AnswerUse Estimated execution plan Pin
David Mujica1-May-09 3:24
David Mujica1-May-09 3:24 
GeneralRe: Use Estimated execution plan Pin
Meysam Mahfouzi1-May-09 5:53
Meysam Mahfouzi1-May-09 5:53 
GeneralRe: Use Estimated execution plan Pin
David Mujica1-May-09 7:55
David Mujica1-May-09 7:55 
AnswerRe: stored procedure is fast, but slow from code Pin
Mycroft Holmes1-May-09 14:52
professionalMycroft Holmes1-May-09 14:52 
QuestionMySQL: how to call a stored proc with OUT param Pin
devvvy30-Apr-09 20:15
devvvy30-Apr-09 20:15 
QuestionMicrosoft SQL 2008 Pin
Ivan200930-Apr-09 10:20
Ivan200930-Apr-09 10:20 
AnswerRe: Microsoft SQL 2008 Pin
Henry Minute30-Apr-09 11:43
Henry Minute30-Apr-09 11:43 
GeneralRe: Microsoft SQL 2008 Pin
Ivan200930-Apr-09 14:12
Ivan200930-Apr-09 14:12 
GeneralRe: Microsoft SQL 2008 Pin
Mycroft Holmes30-Apr-09 17:50
professionalMycroft Holmes30-Apr-09 17:50 
GeneralRe: Microsoft SQL 2008 Pin
Ivan20091-May-09 6:28
Ivan20091-May-09 6:28 
Questionsystem table sysmergesubscriptions: replacements for distributor and srvid Pin
Roland Bär30-Apr-09 6:03
Roland Bär30-Apr-09 6:03 
Questionlinked server error in sql server Pin
Maddie from Dartford30-Apr-09 3:32
Maddie from Dartford30-Apr-09 3:32 
AnswerRe: linked server error in sql server Pin
Mycroft Holmes30-Apr-09 17:54
professionalMycroft Holmes30-Apr-09 17:54 
Questionselect where only Pin
foryou30-Apr-09 0:58
foryou30-Apr-09 0:58 
AnswerRe: select where only Pin
scottgp30-Apr-09 1:46
professionalscottgp30-Apr-09 1:46 

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.