Sequencing Flashcards

Sequencing

1
Q

Update dimension to add a sequence id column

A

Alter table xxxDIM ADD (xxxID number(2))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Create sequence

A

Create Sequence xxx_seq_id start with 1 increment by 1 maxvalue 99999999 minvalue 1 nocycle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Add sequence to ID column

A

Update xxxDim set xxxDIM = xxx_seq_id.nextval

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Add id column to existing tempFact table

A

Alter table tempfact add (xxxID number(2))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Update tempfact to set the sequence id for its id column

A

Update tempfact tf set tf. xxx_id = (select from y. xxxID from xxxDIM y where y.aaa = tf.aaa)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Add sequence using ‘update method’ for 2 records

A

Update xxxDIM set xxxID = 1 where aaa = ‘…’ and Update xxxxDIM set xxxID = 2 where aaa = ‘…’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Update the tempfact sequence id to a sequence using a cursor

A

Declare cursor junkcursor is select * from junkDim; Begin for junkcursorrec in junkcursor LOOP update tempFact set junkID = junkcursorrec. junkID where aaa = junkcursorrec.aaa and bbb = junkcursorrec. bbb and ccc = junkcursorrec.ccc and ddd = junkcursorrec. ddd; End loop; End

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Declare a cursor for the junkDIM

A

Declare cursor junkcursor is select * from junkDim

How well did you know this?
1
Not at all
2
3
4
5
Perfectly