Click here to Skip to main content
15,895,746 members
Home / Discussions / Database
   

Database

 
GeneralRe: Problem with sql server 2000 Pin
Wendelius9-Feb-09 6:14
mentorWendelius9-Feb-09 6:14 
AnswerRe: Problem with sql server 2000 Pin
BESHOY MARKO10-Feb-09 1:58
BESHOY MARKO10-Feb-09 1:58 
QuestionHow to write this query? Pin
varshavmane7-Feb-09 21:31
varshavmane7-Feb-09 21:31 
AnswerRe: How to write this query? Pin
Blue_Boy8-Feb-09 2:49
Blue_Boy8-Feb-09 2:49 
GeneralRe: How to write this query? Pin
varshavmane8-Feb-09 4:15
varshavmane8-Feb-09 4:15 
GeneralRe: How to write this query? Pin
Blue_Boy8-Feb-09 4:22
Blue_Boy8-Feb-09 4:22 
GeneralRe: How to write this query? Pin
varshavmane8-Feb-09 4:35
varshavmane8-Feb-09 4:35 
GeneralRe: How to write this query? Pin
Blue_Boy8-Feb-09 8:50
Blue_Boy8-Feb-09 8:50 
hi,

Well based on your last post I have more clear your situation.
It seems that you dont have increament column in table and i make fast solution,maybe is not the best solution but it will work.

here is code down below,just copy-modify-paste and use in your real data


create table #TempTable <br />
(<br />
IdentValue int IDENTITY(1,1),<br />
Name1   varchar(255),<br />
Name2  varchar(255),<br />
ID  Int<br />
)<br />
<br />
insert into #TempTable <br />
select name1,name2,id from tabela<br />
<br />
<br />
declare @i as int<br />
set @i=0<br />
<br />
declare @startValue as int<br />
set @startValue =2200<br />
<br />
declare @endValue as int<br />
set @endValue=3200<br />
<br />
while @i<(select count(*) from #temptable)<br />
begin<br />
	set @i=@i+1<br />
	set @startValue=@startValue+1<br />
	update #tempTable set ID=@startValue where identValue=@i<br />
end<br />
<br />
delete from tabela<br />
insert into  tabela <br />
select name1,name2,id from #temptable<br />
<br />
drop table #temptable<br />
select * from tabela



I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.


QuestionUpdating Field Length of a Fields in Sql Server 2005 Pin
εїзεїзεїз7-Feb-09 20:36
εїзεїзεїз7-Feb-09 20:36 
AnswerRe: Updating Field Length of a Fields in Sql Server 2005 Pin
Mycroft Holmes8-Feb-09 16:56
professionalMycroft Holmes8-Feb-09 16:56 
GeneralRe: Updating Field Length of a Fields in Sql Server 2005 Pin
εїзεїзεїз8-Feb-09 21:34
εїзεїзεїз8-Feb-09 21:34 
GeneralRe: Updating Field Length of a Fields in Sql Server 2005 Pin
Mycroft Holmes8-Feb-09 21:53
professionalMycroft Holmes8-Feb-09 21:53 
GeneralRe: Updating Field Length of a Fields in Sql Server 2005 Pin
εїзεїзεїз8-Feb-09 22:00
εїзεїзεїз8-Feb-09 22:00 
QuestionSuggestion for Database model to store multiple value types Pin
Jani Giannoudis7-Feb-09 5:30
Jani Giannoudis7-Feb-09 5:30 
AnswerRe: Suggestion for Database model to store multiple value types Pin
Wendelius9-Feb-09 6:08
mentorWendelius9-Feb-09 6:08 
QuestionRe: Suggestion for Database model to store multiple value types Pin
Jani Giannoudis9-Feb-09 6:21
Jani Giannoudis9-Feb-09 6:21 
AnswerRe: Suggestion for Database model to store multiple value types Pin
Wendelius9-Feb-09 6:41
mentorWendelius9-Feb-09 6:41 
QuestionDelete Records Pin
Hemant Thaker7-Feb-09 0:59
Hemant Thaker7-Feb-09 0:59 
AnswerRe: Delete Records Pin
Vimalsoft(Pty) Ltd8-Feb-09 21:41
professionalVimalsoft(Pty) Ltd8-Feb-09 21:41 
Questionpasswords and varbinary in sql server... Pin
l a u r e n6-Feb-09 4:21
l a u r e n6-Feb-09 4:21 
AnswerRe: passwords and varbinary in sql server... Pin
Ennis Ray Lynch, Jr.6-Feb-09 7:23
Ennis Ray Lynch, Jr.6-Feb-09 7:23 
GeneralRe: passwords and varbinary in sql server... Pin
l a u r e n6-Feb-09 7:38
l a u r e n6-Feb-09 7:38 
GeneralRe: passwords and varbinary in sql server... Pin
Ennis Ray Lynch, Jr.6-Feb-09 7:42
Ennis Ray Lynch, Jr.6-Feb-09 7:42 
GeneralRe: passwords and varbinary in sql server... Pin
l a u r e n6-Feb-09 7:47
l a u r e n6-Feb-09 7:47 
QuestionMAX statement Pin
5fingers6-Feb-09 1:24
5fingers6-Feb-09 1:24 

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.