Forum Replies Created

Viewing 15 posts - 241 through 255 (of 283 total)

  • RE: Split without delimiter based on position

    Starting from my first post i will cont.. here

    I am having a query i need to split the query based on the position i specify

    Say

    string is 12345678910111213141516........

    i am having position...

  • RE: Split without delimiter based on position

    Hi, thanks i have learned one new thing today,

    but the thing is i need to insert into the testtable

    Select * from testtable

    Rid,col1,col2,col3,col4,col5,col6

    1 ,1,2,34,56789,1011,12

    my testtable will be a dynamic one based...

  • RE: Split without delimiter based on position

    Hi

    I am getting the error as

    declare @pi_input varchar(max)

    declare @query varchar(max)

    select @pi_input ='0123456'

    SET @query = N'Select '+'SUBSTRING(@Input,'+convert(varchar,0) +',1)'

    print @query

    exec (@query)

    Select SUBSTRING(@Input,0,1)

    Msg 137, Level 15, State 2,...

  • RE: Split without delimiter based on position

    Without while loop can we do this?

    since loop is taking more time any other alternate method

    Thanks!

  • RE: Split without delimiter based on position

    I have used Pivot pls correct me if i have done wrong

    DECLARE @cols NVARCHAR(2000)

    SELECT @cols = COALESCE(@cols + ',[' + Convert(varchar,Rid )+ ']', '[' + Convert(varchar,Rid ) + ']')

    FROM...

  • RE: Split without delimiter based on position

    hey it has worked thanks

    now the thing is i need to insert this data into a table

    my table is

    create testtable (Rid int identity(1,1),col1 int,col2 int,col3 int,col4 int,col5 int,col6 int)

    i need...

  • RE: #Table

    # is a Local temporary tables

    ## is a Global temporary tables

    Local Temp table is valid only for that processor id(@@SPID) alone where as Global Temp table is valid across all...

  • RE: un split in sql

    declare @Temp Table(Col int)

    Insert into @Temp

    Select 1

    UNION Select 2

    UNION Select 3

    UNION Select 4

    UNION Select 5

    Select * from @Temp

    Declare @COALESCE varchar(200)

    Set @COALESCE=''

    Select @COALESCE=@COALESCE+Convert(varchar,Col)+',' from @Temp

    Select @COALESCE=left(@COALESCE,LEN(@COALESCE)-1)

    Select @COALESCE

    Thanks!

  • RE: SQL server in loop Evaluation

    Thanks for your replay,

    As i have stated early [Quote]Inserting the data externally not from the database itself. [/Quote] my aim is not inserting from the database i need to insert...

  • RE: SQL server in loop Evaluation

    [Quote]Your loop doesn't insert any data - it just repeatedly overwrites the command's parameters. The only calls to the database are befor the loop begins and after it ends, to...

  • RE: SQL server in loop Evaluation

    [Quote]

    INSERT INTO test(col1, col2) VALUES

    ( @param1, @param2),

    ( @param1, @param2),

    ( @param1, @param2),

    ( @param1, @param2),...

  • RE: SQL server in loop Evaluation

    [Quote] Most of the people here won't take the approach you're using. I'm not sure what is completely your goal. [/Quote]

    So what is your suggestion for inserting the data externally...

  • RE: SQL server in loop Evaluation

    The SQL server' default is Auto commit which is Read committed transaction,here each command is a single transaction so once the loop run each and every record is auto committed...

  • RE: SQL server in loop Evaluation

    What is Set based approach.How can i check the data insertion time with .net or java as interface.i need to measure the insertion time.Start time then insertion(population of data) then...

  • RE: Calculating the total for the month

    Can you give little bit more accurate data what you need u have only given Aug data,can you provide Aug and Sep data and what is the final solution you...

Viewing 15 posts - 241 through 255 (of 283 total)