Click here to Skip to main content
15,919,613 members
Home / Discussions / Database
   

Database

 
AnswerRe: Restore database using t-sq Pin
Mike Dimmick6-Aug-07 3:54
Mike Dimmick6-Aug-07 3:54 
QuestionHow to Code for Inserting Data into SQL using C# [modified] Pin
sacheesach3-Aug-07 22:10
sacheesach3-Aug-07 22:10 
AnswerRe: How to Code for Inserting Data into SQL using C# Pin
Colin Angus Mackay3-Aug-07 22:28
Colin Angus Mackay3-Aug-07 22:28 
GeneralRe: How to Code for Inserting Data into SQL using C# Pin
sacheesach3-Aug-07 22:48
sacheesach3-Aug-07 22:48 
GeneralRe: How to Code for Inserting Data into SQL using C# Pin
Colin Angus Mackay3-Aug-07 23:10
Colin Angus Mackay3-Aug-07 23:10 
GeneralRe: How to Code for Inserting Data into SQL using C# Pin
sacheesach4-Aug-07 3:46
sacheesach4-Aug-07 3:46 
Questionhow to compare rows of database without using query? Pin
Affan Toor3-Aug-07 18:34
Affan Toor3-Aug-07 18:34 
AnswerRe: how to compare rows of database without using query? Pin
N a v a n e e t h3-Aug-07 21:50
N a v a n e e t h3-Aug-07 21:50 
Affan Toor wrote:
There is a scenario in my application where i need to compare rows of a table with each other and if they match then store its one copy in another table


How it should match ? All columns should match or only some columns. I presume that it should match all cloumns. Writing a single query that does all theses things seems impossible to me. You can do this using cursors.

Declare YourCursor Cursor For
Select Coulumn1,Column2,Column3..... from your table
Open YourCursor
FETCH NEXT FROM YourCursor into @Columnvar1,@Columnvar2...
WHILE @@FETCH_STATUS <> -1
BEGIN
   --Select rows from table and insert to new table
   Insert into newtable
       Select columns fom table where column1=@Columnvar1, column2 = @Columnvar1
   FETCH NEXT FROM YourCursor into @Columnvar1,@Columnvar2...

END
Close YourCursor 
deallocate YourCursor
select * from newtable


This may insert duplicate rows into newtable. You need to refine the code to make it work for you.


GeneralRe: how to compare rows of database without using query? Pin
Affan Toor5-Aug-07 21:44
Affan Toor5-Aug-07 21:44 
QuestionSybase Profiler like SQL Profiler Pin
Bad Programmer3-Aug-07 11:22
Bad Programmer3-Aug-07 11:22 
AnswerRe: Sybase Profiler like SQL Profiler Pin
Paul Conrad4-Aug-07 8:42
professionalPaul Conrad4-Aug-07 8:42 
Questionsql 2005 32bit & 64 bit? Pin
costavo3-Aug-07 10:03
costavo3-Aug-07 10:03 
AnswerRe: sql 2005 32bit & 64 bit? Pin
Mike Dimmick3-Aug-07 13:38
Mike Dimmick3-Aug-07 13:38 
Questionfile with dot sql extension Pin
ASPnoob3-Aug-07 5:45
ASPnoob3-Aug-07 5:45 
AnswerRe: file with dot sql extension Pin
Mike Dimmick3-Aug-07 6:49
Mike Dimmick3-Aug-07 6:49 
AnswerRe: file with dot sql extension Pin
originSH5-Aug-07 21:51
originSH5-Aug-07 21:51 
QuestionActual probs in procedure..., Pin
Member 38798813-Aug-07 4:04
Member 38798813-Aug-07 4:04 
AnswerRe: Actual probs in procedure..., Pin
Colin Angus Mackay3-Aug-07 4:19
Colin Angus Mackay3-Aug-07 4:19 
QuestionTrying to convert some VB code into C# Pin
c0rvus3-Aug-07 2:57
c0rvus3-Aug-07 2:57 
AnswerRe: Trying to convert some VB code into C# Pin
Pete O'Hanlon3-Aug-07 3:32
mvePete O'Hanlon3-Aug-07 3:32 
GeneralRe: Trying to convert some VB code into C# Pin
c0rvus3-Aug-07 13:43
c0rvus3-Aug-07 13:43 
GeneralRe: Trying to convert some VB code into C# Pin
Pete O'Hanlon5-Aug-07 9:13
mvePete O'Hanlon5-Aug-07 9:13 
AnswerRe: Trying to convert some VB code into C# Pin
Blue_Boy3-Aug-07 5:15
Blue_Boy3-Aug-07 5:15 
QuestionHow to communicate an AJAX and SQL directly Pin
Exelioindia3-Aug-07 2:35
Exelioindia3-Aug-07 2:35 
AnswerRe: How to communicate an AJAX and SQL directly Pin
Mike Dimmick3-Aug-07 2:53
Mike Dimmick3-Aug-07 2:53 

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.