Click here to Skip to main content
15,911,531 members
Home / Discussions / Database
   

Database

 
QuestionTop N Per StockCode Pin
Elizma4-Jul-09 3:27
Elizma4-Jul-09 3:27 
AnswerRe: Top N Per StockCode Pin
Niladri_Biswas4-Jul-09 3:43
Niladri_Biswas4-Jul-09 3:43 
GeneralRe: Top N Per StockCode Pin
Elizma5-Jul-09 6:45
Elizma5-Jul-09 6:45 
AnswerRe: Top N Per StockCode Pin
Isaac Gordon5-Jul-09 22:01
Isaac Gordon5-Jul-09 22:01 
GeneralRe: Top N Per StockCode Pin
Elizma5-Jul-09 22:23
Elizma5-Jul-09 22:23 
GeneralRe: Top N Per StockCode Pin
Enver Maroshi5-Jul-09 23:22
Enver Maroshi5-Jul-09 23:22 
GeneralRe: Top N Per StockCode Pin
Elizma6-Jul-09 1:42
Elizma6-Jul-09 1:42 
AnswerRe: Top N Per StockCode Pin
Isaac Gordon5-Jul-09 23:59
Isaac Gordon5-Jul-09 23:59 
GeneralRe: Top N Per StockCode Pin
Elizma6-Jul-09 1:38
Elizma6-Jul-09 1:38 
QuestionTransactional Replication Linked Sever error Pin
Abdul Rahman Hamidy3-Jul-09 18:24
Abdul Rahman Hamidy3-Jul-09 18:24 
AnswerRe: Transactional Replication Linked Sever error Pin
Niladri_Biswas4-Jul-09 3:51
Niladri_Biswas4-Jul-09 3:51 
AnswerRe: Transactional Replication Linked Sever error Pin
Jerry Hammond4-Jul-09 5:00
Jerry Hammond4-Jul-09 5:00 
QuestionHow do you increment a temporary table? Pin
DFlat4Now3-Jul-09 8:07
DFlat4Now3-Jul-09 8:07 
AnswerRe: How do you increment a temporary table? Pin
Niladri_Biswas4-Jul-09 3:37
Niladri_Biswas4-Jul-09 3:37 
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 

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.