Click here to Skip to main content
15,887,083 members
Home / Discussions / Database
   

Database

 
AnswerRe: sql query Pin
Eddy Vluggen30-Oct-08 23:42
professionalEddy Vluggen30-Oct-08 23:42 
GeneralRe: sql query Pin
joindotnet30-Oct-08 23:58
joindotnet30-Oct-08 23:58 
AnswerRe: sql query Pin
Eddy Vluggen31-Oct-08 0:49
professionalEddy Vluggen31-Oct-08 0:49 
GeneralRe: sql query Pin
joindotnet31-Oct-08 1:09
joindotnet31-Oct-08 1:09 
GeneralRe: sql query Pin
leckey31-Oct-08 13:34
leckey31-Oct-08 13:34 
QuestionSQLBulkCopy with ODBC Pin
Member 251595529-Oct-08 20:00
Member 251595529-Oct-08 20:00 
AnswerRe: SQLBulkCopy with ODBC Pin
Wendelius30-Oct-08 8:10
mentorWendelius30-Oct-08 8:10 
QuestionExtract number from string Pin
kyi kyi29-Oct-08 15:36
kyi kyi29-Oct-08 15:36 
Hi..

My function is to extract only number from given string.
i m using mysql database and i m new to the syntax.
is there anyone help me pls?

thanks in advance!
=====================
BEGIN
DECLARE @Count INT
DECLARE @IntNumbers VARCHAR(1000)
SET @Count = 0
SET @IntNumbers = ''

WHILE @Count <= LEN(@String)
BEGIN
IF SUBSTRING(@String,@Count,1) >= '0'
AND SUBSTRING(@String,@Count,1) <= '9'
BEGIN
SET @IntNumbers = @IntNumbers + SUBSTRING(@String,@Count,1)
END
SET @Count = @Count + 1
END


RETURN @IntNumbers
=============================================
The following error Message is shown.

Script line: 4 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@locator VARCHAR(20))
RETURNS INT
AS
BEGIN
DECLARE @cnt INT
DECLARE' at line 1
AnswerRe: Extract number from string Pin
Meysam Mahfouzi29-Oct-08 17:26
Meysam Mahfouzi29-Oct-08 17:26 
GeneralRe: Extract number from string Pin
kyi kyi29-Oct-08 18:06
kyi kyi29-Oct-08 18:06 
GeneralRe: Extract number from string Pin
Meysam Mahfouzi29-Oct-08 20:02
Meysam Mahfouzi29-Oct-08 20:02 
QuestionUsing SQL as categorized tagging backend Pin
jchalfant29-Oct-08 4:36
jchalfant29-Oct-08 4:36 
AnswerRe: Using SQL as categorized tagging backend Pin
Wendelius29-Oct-08 8:12
mentorWendelius29-Oct-08 8:12 
GeneralRe: Using SQL as categorized tagging backend Pin
jchalfant29-Oct-08 8:37
jchalfant29-Oct-08 8:37 
GeneralRe: Using SQL as categorized tagging backend Pin
Wendelius29-Oct-08 8:53
mentorWendelius29-Oct-08 8:53 
AnswerRe: Using SQL as categorized tagging backend Pin
Ashfield29-Oct-08 9:53
Ashfield29-Oct-08 9:53 
GeneralRe: Using SQL as categorized tagging backend Pin
Wendelius3-Nov-08 9:19
mentorWendelius3-Nov-08 9:19 
QuestionAlternative to SOUNDEX? Pin
Richard Jones29-Oct-08 3:54
Richard Jones29-Oct-08 3:54 
AnswerRe: Alternative to SOUNDEX? Pin
Wendelius29-Oct-08 8:05
mentorWendelius29-Oct-08 8:05 
GeneralRe: Alternative to SOUNDEX? Pin
Richard Jones29-Oct-08 9:15
Richard Jones29-Oct-08 9:15 
GeneralRe: Alternative to SOUNDEX? Pin
Wendelius29-Oct-08 9:36
mentorWendelius29-Oct-08 9:36 
GeneralRe: Alternative to SOUNDEX? Pin
Richard Jones29-Oct-08 9:40
Richard Jones29-Oct-08 9:40 
GeneralRe: Alternative to SOUNDEX? Pin
ChandraRam30-Oct-08 1:23
ChandraRam30-Oct-08 1:23 
QuestionSSIS - Multiple packages using the same sharepoint path Pin
notes4we29-Oct-08 3:03
notes4we29-Oct-08 3:03 
Questionhow to get in report watermark text Pin
imranafsari28-Oct-08 23:56
imranafsari28-Oct-08 23:56 

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.