Click here to Skip to main content
15,898,741 members
Home / Discussions / Database
   

Database

 
Questiondate manipulation Pin
scottichrosaviakosmos16-Oct-10 21:37
scottichrosaviakosmos16-Oct-10 21:37 
AnswerRe: date manipulation Pin
Mycroft Holmes16-Oct-10 22:19
professionalMycroft Holmes16-Oct-10 22:19 
GeneralRe: date manipulation Pin
scottichrosaviakosmos16-Oct-10 22:40
scottichrosaviakosmos16-Oct-10 22:40 
GeneralRe: date manipulation Pin
Mycroft Holmes17-Oct-10 2:02
professionalMycroft Holmes17-Oct-10 2:02 
AnswerRe: date manipulation Pin
Alegria_Lee17-Oct-10 19:01
Alegria_Lee17-Oct-10 19:01 
QuestionInsert Excel OR CSV File into MySQL OR MSSQL Database Pin
jasonmp16-Oct-10 12:17
jasonmp16-Oct-10 12:17 
AnswerRe: Insert Excel OR CSV File into MySQL OR MSSQL Database Pin
Mycroft Holmes16-Oct-10 12:37
professionalMycroft Holmes16-Oct-10 12:37 
AnswerRe: Insert Excel OR CSV File into MySQL OR MSSQL Database Pin
SimulationofSai16-Oct-10 14:31
SimulationofSai16-Oct-10 14:31 
AnswerRe: Insert Excel OR CSV File into MySQL OR MSSQL Database Pin
SQLMechanic29-Oct-10 5:47
SQLMechanic29-Oct-10 5:47 
QuestionMultiple Rows to Single Rows Pin
Chris Meech15-Oct-10 8:32
Chris Meech15-Oct-10 8:32 
AnswerPivot Pin
David Mujica15-Oct-10 9:06
David Mujica15-Oct-10 9:06 
AnswerRe: Multiple Rows to Single Rows Pin
PIEBALDconsult15-Oct-10 12:44
mvePIEBALDconsult15-Oct-10 12:44 
AnswerRe: Multiple Rows to Single Rows Pin
Alegria_Lee15-Oct-10 17:01
Alegria_Lee15-Oct-10 17:01 
GeneralRe: Multiple Rows to Single Rows Pin
Blue_Boy16-Oct-10 5:51
Blue_Boy16-Oct-10 5:51 
GeneralRe: Multiple Rows to Single Rows Pin
Chris Meech18-Oct-10 4:17
Chris Meech18-Oct-10 4:17 
GeneralRe: Multiple Rows to Single Rows Pin
Alegria_Lee18-Oct-10 4:48
Alegria_Lee18-Oct-10 4:48 
Questionsplitting one column into many Pin
rakeshs31215-Oct-10 0:42
rakeshs31215-Oct-10 0:42 
AnswerRe: splitting one column into many Pin
J4amieC15-Oct-10 1:17
J4amieC15-Oct-10 1:17 
GeneralRe: splitting one column into many Pin
rakeshs31215-Oct-10 2:23
rakeshs31215-Oct-10 2:23 
GeneralRe: splitting one column into many Pin
J4amieC15-Oct-10 2:53
J4amieC15-Oct-10 2:53 
AnswerRe: splitting one column into many Pin
PIEBALDconsult15-Oct-10 3:07
mvePIEBALDconsult15-Oct-10 3:07 
AnswerRe: splitting one column into many Pin
Rajesh Anuhya19-Oct-10 23:57
professionalRajesh Anuhya19-Oct-10 23:57 
Here i am giving a scalar function to active this..,

GO
/****** Object:  UserDefinedFunction [dbo].[SplitGETPosFunc]    Script Date: 10/20/2010 15:22:03 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[SplitGETPosFunc](@String varchar(8000), 
@Delimiter char(1),
@POSITION INT)
RETURNS varchar(1000)
WITH EXECUTE AS CALLER
AS
begin     
	declare @idx int;     
    DECLARE @CHARIDX INT;
    DECLARE @INPUTSTR VARCHAR(8000);
    declare @OUTPUT varchar(1000);
    SET @INPUTSTR=@String;
    SET @CHARIDX =0;
    SET @idx=0;
    if (substring(@String,1,1)='S')
		begin
			while @idx < @POSITION   
				begin     
				SET @CHARIDX= CHARINDEX(@Delimiter, @INPUTSTR);
				SET @OUTPUT=SUBSTRING(@INPUTSTR, 1, @CHARIDX - 1)
				SET @INPUTSTR = SUBSTRING(@INPUTSTR,@CHARIDX +1,LEN(@INPUTSTR));
				SET @idx=@idx+1;
			end 
		end
	else
	   set @OUTPUT=@String;
return   @OUTPUT;  
end


@String = original string
@Delimiter = delemeter (in your case space)
@POSITION INT = position of the word(starts from 1)


function will return the word in the specified location


Thanks & Regards
Rajesh B
Rajesh B --> A Poor Workman Blames His Tools <--

Questionexesute ssis package Pin
samerh14-Oct-10 3:24
samerh14-Oct-10 3:24 
AnswerRe: exesute ssis package Pin
Vimalsoft(Pty) Ltd14-Oct-10 4:53
professionalVimalsoft(Pty) Ltd14-Oct-10 4:53 
Question1 recursive field in a Query Pin
Herman<T>.Instance14-Oct-10 0:25
Herman<T>.Instance14-Oct-10 0:25 

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.