Click here to Skip to main content
15,891,033 members
Home / Discussions / Database
   

Database

 
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 
Select *
Into #BC
From dfCert -- Creates master Certification table -> #BC

Declare @BoardCert Char(3)
Set @BoardCert = 'BCn'

Declare @Counter int
Set @Counter = 1

While @Counter < 10
Begin

Select
Biog_Nbr,
Max(Biog_Cert_ID) as aMaxBiogCertID,
Max(Cert_Year) as aMaxCertYear
Into
#tblBoardCert
From
#BC
Group By
Biog_Nbr

Delete From #BC
From #BC
Inner Join #tblBoardCert
On
#BC.Biog_Nbr = #tblBoardCert.Biog_Nbr
and
#BC.Biog_Cert_ID = #tblBoardCert.AMaxBiogCertID
and
#BC.Cert_Year = #tblBoardCert.aMaxCertYear
Where
#BC.Biog_Nbr = #tblBoardCert.Biog_Nbr
and
#BC.Biog_Cert_ID = #tblBoardCert.AMaxBiogCertID
and
#BC.Cert_Year = #tblBoardCert.aMaxCertYear

Set @BoardCert = Replace(Left(@BoardCert,2)+Cast(@Counter as Char),' ','')

Select *
Into #@BoardCert --<< Here's the problem. I need this to be #BC1 then BC2, etc up to BC9
From #tblBoardCert

Drop Table #tblBoardCert

Set @Counter = @Counter + 1

Print 'The counter has just increased to ' + Cast(@Counter as Char)

End
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 
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 

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.