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

Database

 
QuestionSQL 2005 Cross-DB Coding Compatibility [modified] Pin
MatthysDT13-Aug-08 23:45
MatthysDT13-Aug-08 23:45 
AnswerRe: SQL 2005 Cross-DB Coding Compatibility Pin
Wendelius14-Aug-08 5:44
mentorWendelius14-Aug-08 5:44 
AnswerRe: SQL 2005 Cross-DB Coding Compatibility Pin
Mycroft Holmes14-Aug-08 15:45
professionalMycroft Holmes14-Aug-08 15:45 
Questionget row index Pin
nelsonpaixao13-Aug-08 13:16
nelsonpaixao13-Aug-08 13:16 
AnswerRe: get row index Pin
Mycroft Holmes13-Aug-08 13:48
professionalMycroft Holmes13-Aug-08 13:48 
AnswerRe: get row index Pin
PIEBALDconsult13-Aug-08 14:08
mvePIEBALDconsult13-Aug-08 14:08 
AnswerRe: get row index Pin
RyanEK13-Aug-08 17:20
RyanEK13-Aug-08 17:20 
AnswerRe: get row index Pin
Blue_Boy13-Aug-08 22:08
Blue_Boy13-Aug-08 22:08 
<br />
ALTER TABLE tableName ADD value int NULL<br />
<br />
DECLARE @i AS INT<br />
DECLARE @j AS INT<br />
SET @i=0<br />
SET @j=0<br />
<br />
WHILE @j<=(SELECT MAX(id) FROM tableName )<br />
BEGIN<br />
SET @j=@j+1	<br />
	IF(SELECT COUNT(id) FROM tableName WHERE id=@j)=0<br />
	BEGIN<br />
	SET @i=@i+1	<br />
	UPDATE tableName SET value=@i WHERE id=@j<br />
	END	<br />
END<br />
<br />
SELECT * FROM tableName WHERE value =3<br />
ALTER TABLE tableName DROP COLUMN value<br />
<code><br />
<br />
Hope it helps... <br />
<br />
<div class="ForumSig"><hr><small>  <font color="Brown" size="2" face="Curier New">I Love T-SQL</font></small><br />
<small>  <font color="Brown" size="1" face="Curier New">"Don't torture yourself,let the life to do it for you."</font></small><br />
</hr></div>

AnswerRe: get row index Pin
Tripathi Swati18-Aug-08 22:42
Tripathi Swati18-Aug-08 22:42 
Questionfast search with SQL Server 2000 on varchar column Pin
Rajkamal_dfine13-Aug-08 9:17
Rajkamal_dfine13-Aug-08 9:17 
AnswerRe: fast search with SQL Server 2000 on varchar column Pin
Wendelius13-Aug-08 9:41
mentorWendelius13-Aug-08 9:41 
QuestionSQL Hosting advice Pin
AlexeiXX313-Aug-08 8:43
AlexeiXX313-Aug-08 8:43 
AnswerRe: SQL Hosting advice Pin
leoinfo13-Aug-08 9:45
leoinfo13-Aug-08 9:45 
GeneralRe: SQL Hosting advice Pin
AlexeiXX313-Aug-08 9:51
AlexeiXX313-Aug-08 9:51 
Questiona qucik question Pin
alexyxj13-Aug-08 7:58
alexyxj13-Aug-08 7:58 
AnswerRe: a qucik question Pin
PIEBALDconsult13-Aug-08 8:03
mvePIEBALDconsult13-Aug-08 8:03 
GeneralRe: a qucik question Pin
Wendelius13-Aug-08 8:04
mentorWendelius13-Aug-08 8:04 
AnswerRe: a qucik question Pin
Tim Carmichael13-Aug-08 8:06
Tim Carmichael13-Aug-08 8:06 
JokeRe: a qucik question Pin
Manas Bhardwaj13-Aug-08 8:08
professionalManas Bhardwaj13-Aug-08 8:08 
QuestionRemove decimal with out rounding. Pin
kurangu13-Aug-08 5:17
kurangu13-Aug-08 5:17 
AnswerRe: Remove decimal with out rounding. Pin
David Mujica13-Aug-08 5:38
David Mujica13-Aug-08 5:38 
GeneralRe: Remove decimal with out rounding. Pin
kurangu13-Aug-08 5:45
kurangu13-Aug-08 5:45 
GeneralRe: I was too slow Pin
David Mujica13-Aug-08 6:15
David Mujica13-Aug-08 6:15 
AnswerRe: Remove decimal with out rounding. Pin
Tim Carmichael13-Aug-08 5:55
Tim Carmichael13-Aug-08 5:55 
AnswerRe: Remove decimal with out rounding. Pin
Blue_Boy13-Aug-08 7:39
Blue_Boy13-Aug-08 7:39 

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.