Viewing 15 posts - 241 through 255 (of 283 total)
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...
October 22, 2012 at 3:55 am
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...
October 22, 2012 at 12:13 am
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,...
October 19, 2012 at 4:02 am
Without while loop can we do this?
since loop is taking more time any other alternate method
Thanks!
October 19, 2012 at 2:35 am
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...
October 18, 2012 at 6:38 am
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...
October 18, 2012 at 4:52 am
# 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...
October 9, 2012 at 3:10 am
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!
October 7, 2012 at 11:41 pm
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...
September 25, 2012 at 8:47 am
[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...
September 25, 2012 at 8:25 am
[Quote]
INSERT INTO test(col1, col2) VALUES
( @param1, @param2),
( @param1, @param2),
( @param1, @param2),
( @param1, @param2),...
September 25, 2012 at 8:17 am
[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...
September 25, 2012 at 7:41 am
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...
September 25, 2012 at 6:23 am
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...
September 25, 2012 at 6:01 am
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...
September 17, 2012 at 5:04 am
Viewing 15 posts - 241 through 255 (of 283 total)