Click here to Skip to main content
15,889,462 members
Home / Discussions / Database
   

Database

 
GeneralRe: How do you increment a temporary table? Pin
DFlat4Now4-Jul-09 5:55
DFlat4Now4-Jul-09 5:55 
AnswerRe: How do you increment a temporary table? Pin
Mycroft Holmes4-Jul-09 23:38
professionalMycroft Holmes4-Jul-09 23:38 
QuestionOnline Database and Forum, where to start? Beginner* Pin
rbwest863-Jul-09 5:44
rbwest863-Jul-09 5:44 
AnswerRe: Online Database and Forum, where to start? Beginner* Pin
David Mujica4-Jul-09 2:31
David Mujica4-Jul-09 2:31 
QuestionProblem with SQL Pin
Sider893-Jul-09 4:27
Sider893-Jul-09 4:27 
AnswerRe: Problem with SQL Pin
Blue_Boy3-Jul-09 4:55
Blue_Boy3-Jul-09 4:55 
AnswerRe: Problem with SQL Pin
Niladri_Biswas3-Jul-09 18:45
Niladri_Biswas3-Jul-09 18:45 
QuestionCheck Which rows are changed Pin
avi_dadi20023-Jul-09 0:38
avi_dadi20023-Jul-09 0:38 
Hello All,
        
         Here i'll explain very clear please read my problem with little patience.

   I've two table X and Y. after every hour i'm moving all the records from X to y (now x table don't have any rows). After insert into Y table i'm checking 1 column value with the recent existed record in the Y table, If the value changes then i'm updating the Ischanged column value to 1 , if not with 0.

this is working fine for me.( I'm doing this in trigger)

Now the problem is , there are multiple records coming from X table with different column values in my desired column.

X Table :

Col1            Col2                  Col3
1                  1234               4781258
2                  1234               4781258
3                  1234               4781259
4                  1234               4781258
5                  1234               4781259
6                  1234               4781258
7                  1234               4781258
8                  5487               5124873
9                  5487               5124873
10               5487               5124873

Assume 1234 and 5478 records exist in Y table earlier
with coll 3 value      4781258 and 5124873 respectively.

Y Table (Expected)

Col1            Col2                  Col3         IsChanged
1                  1234               4781258      0
2                  1234               4781258      0
3                  1234               4781259      1 (changed from 4781258 to 4781259)
4                  1234               4781258      1 (changed from 4781259 to 4781258)
5                  1234               4781259      1 (changed from 4781258 to 4781259)
6                  1234               4781259      0 (not changed with the prev record)
7                  1234               4781258      1 (changed from 4781259 to 4781258)
8                  5487               5124873      0 (not changed with the prev record)
9                  5487               5124873      0
10               5487               5124873      0


Thanks in advance. If anybody knows the solution please help me out.

Avinash
AnswerRe: Check Which rows are changed Pin
Henry Minute3-Jul-09 1:59
Henry Minute3-Jul-09 1:59 
GeneralRe: Check Which rows are changed Pin
avi_dadi20023-Jul-09 9:28
avi_dadi20023-Jul-09 9:28 
GeneralRe: Check Which rows are changed Pin
Henry Minute3-Jul-09 9:50
Henry Minute3-Jul-09 9:50 
GeneralRe: Check Which rows are changed Pin
avi_dadi20023-Jul-09 20:12
avi_dadi20023-Jul-09 20:12 
AnswerRe: Check Which rows are changed Pin
Niladri_Biswas4-Jul-09 2:17
Niladri_Biswas4-Jul-09 2:17 
QuestionHow to modify the SP in case of multiple row data into single row Pin
Krishna Aditya2-Jul-09 23:44
Krishna Aditya2-Jul-09 23:44 
AnswerRe: How to modify the SP in case of multiple row data into single row Pin
Niladri_Biswas3-Jul-09 6:24
Niladri_Biswas3-Jul-09 6:24 
GeneralRe: How to modify the SP in case of multiple row data into single row Pin
Krishna Aditya9-Jul-09 3:50
Krishna Aditya9-Jul-09 3:50 
GeneralLike Command in SQL Server 2005 Pin
Isaac Gordon2-Jul-09 23:24
Isaac Gordon2-Jul-09 23:24 
GeneralRe: Like Command in SQL Server 2005 Pin
Eddy Vluggen3-Jul-09 1:17
professionalEddy Vluggen3-Jul-09 1:17 
GeneralRe: Like Command in SQL Server 2005 Pin
David Skelly3-Jul-09 2:17
David Skelly3-Jul-09 2:17 
GeneralRe: Like Command in SQL Server 2005 Pin
Niladri_Biswas3-Jul-09 7:15
Niladri_Biswas3-Jul-09 7:15 
GeneralRe: Like Command in SQL Server 2005 Pin
Isaac Gordon3-Jul-09 19:08
Isaac Gordon3-Jul-09 19:08 
GeneralRe: Like Command in SQL Server 2005 Pin
Niladri_Biswas4-Jul-09 4:49
Niladri_Biswas4-Jul-09 4:49 
Questiontrigger on system tables Pin
sunit_822-Jul-09 22:54
sunit_822-Jul-09 22:54 
AnswerRe: trigger on system tables [modified] Pin
Niladri_Biswas3-Jul-09 17:29
Niladri_Biswas3-Jul-09 17:29 
GeneralRe: trigger on system tables Pin
sunit_825-Jul-09 22:39
sunit_825-Jul-09 22: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.