Click here to Skip to main content
12,507,674 members (55,533 online)
   

Database

 
AnswerRe: What happens with auto-incremented value on rollback? Pin
gvprabu20-Feb-13 23:02
membergvprabu20-Feb-13 23:02 
QuestionBook recommendation for learning SQL Pin
Lloyd Atkinson29-Jan-13 18:33
memberLloyd Atkinson29-Jan-13 18:33 
AnswerRe: Book recommendation for learning SQL Pin
Jörgen Andersson30-Jan-13 0:52
memberJörgen Andersson30-Jan-13 0:52 
AnswerRe: Book recommendation for learning SQL Pin
i.j.russell30-Jan-13 4:34
memberi.j.russell30-Jan-13 4:34 
AnswerRe: Book recommendation for learning SQL Pin
Simon_Whale30-Jan-13 5:46
memberSimon_Whale30-Jan-13 5:46 
AnswerRe: Book recommendation for learning SQL Pin
djj5530-Jan-13 6:33
memberdjj5530-Jan-13 6:33 
AnswerRe: Book recommendation for learning SQL Pin
gvprabu20-Feb-13 23:09
membergvprabu20-Feb-13 23:09 
QuestionCan we delete old records from aspstatetempsessions table? Pin
manikantaer29-Jan-13 17:43
membermanikantaer29-Jan-13 17:43 
AnswerRe: Can we delete old records from aspstatetempsessions table? Pin
thatraja4-Oct-13 20:46
mvpthatraja4-Oct-13 20:46 
Questioncontrol AVG cost and close stock Pin
kornkimhour29-Jan-13 15:13
memberkornkimhour29-Jan-13 15:13 
AnswerRe: control AVG cost and close stock Pin
thatraja4-Oct-13 20:50
mvpthatraja4-Oct-13 20:50 
QuestionMySQL Table Lock Question Pin
Richard Andrew x6429-Jan-13 12:46
memberRichard Andrew x6429-Jan-13 12:46 
AnswerRe: MySQL Table Lock Question Pin
Jörgen Andersson30-Jan-13 10:34
memberJörgen Andersson30-Jan-13 10:34 
QuestionSQL Update Pin
mrfalk29-Jan-13 11:24
membermrfalk29-Jan-13 11:24 
I need some help with an SQL query I’ve been asked to create.

Due to lack of communication, an update was done incorrectly and now needs to be fixed (surprise, surprise Big Grin | :-D ). Each employee has 5 Ben_Codes and the start date for all Ben_Codes needs to be equal to the start date of Ben_Code 1. The dates are not constant so for each employee I need to read Ben_Code 1 record to retrieve start_date and then update Ben_Codes 2 thru 5 with that start_date.

To this point I have done very basic updates using SQL Query and would appreciate any guidance you can provide!!


Emp_id, Ben_Code, start_date
99999 1 10/12/12
99999 2 01/12/13
99999 3 01/12/13
99999 4 01/12/13
99999 5 01/12/13
98989 1 9/15/2012
98989 2 01/12/13
98989 3 01/12/13
98989 4 01/12/13
98989 5 01/12/13
AnswerRe: SQL Update Pin
PIEBALDconsult29-Jan-13 11:47
memberPIEBALDconsult29-Jan-13 11:47 
GeneralRe: SQL Update Pin
mrfalk29-Jan-13 12:07
membermrfalk29-Jan-13 12:07 
AnswerRe: SQL Update Pin
Michael Potter29-Jan-13 11:50
memberMichael Potter29-Jan-13 11:50 
GeneralRe: SQL Update Pin
PIEBALDconsult29-Jan-13 11:59
memberPIEBALDconsult29-Jan-13 11:59 
GeneralRe: SQL Update Pin
Mycroft Holmes29-Jan-13 12:09
memberMycroft Holmes29-Jan-13 12:09 
GeneralRe: SQL Update Pin
mrfalk29-Jan-13 12:17
membermrfalk29-Jan-13 12:17 
GeneralRe: SQL Update Pin
PIEBALDconsult29-Jan-13 12:27
memberPIEBALDconsult29-Jan-13 12:27 
GeneralRe: SQL Update Pin
Mycroft Holmes29-Jan-13 13:49
memberMycroft Holmes29-Jan-13 13:49 
GeneralRe: SQL Update Pin
PIEBALDconsult29-Jan-13 12:20
memberPIEBALDconsult29-Jan-13 12:20 
GeneralRe: SQL Update Pin
Mycroft Holmes29-Jan-13 13:54
memberMycroft Holmes29-Jan-13 13:54 
GeneralRe: SQL Update Pin
jschell29-Jan-13 14:13
memberjschell29-Jan-13 14:13 
GeneralRe: SQL Update Pin
Michael Potter30-Jan-13 4:28
memberMichael Potter30-Jan-13 4:28 
GeneralRe: SQL Update Pin
PIEBALDconsult30-Jan-13 5:05
memberPIEBALDconsult30-Jan-13 5:05 
GeneralRe: SQL Update Pin
jschell30-Jan-13 7:58
memberjschell30-Jan-13 7:58 
GeneralRe: SQL Update Pin
PIEBALDconsult30-Jan-13 8:40
memberPIEBALDconsult30-Jan-13 8:40 
GeneralRe: SQL Update Pin
Michael Potter31-Jan-13 3:57
memberMichael Potter31-Jan-13 3:57 
GeneralRe: SQL Update Pin
PIEBALDconsult31-Jan-13 4:05
memberPIEBALDconsult31-Jan-13 4:05 
GeneralRe: SQL Update Pin
jschell31-Jan-13 8:01
memberjschell31-Jan-13 8:01 
AnswerRe: SQL Update Pin
PIEBALDconsult29-Jan-13 13:22
memberPIEBALDconsult29-Jan-13 13:22 
AnswerRe: SQL Update Pin
Jörgen Andersson30-Jan-13 1:21
memberJörgen Andersson30-Jan-13 1:21 
AnswerRe: SQL Update Pin
mrfalk30-Jan-13 6:20
membermrfalk30-Jan-13 6:20 
QuestionDatabase backup size Pin
savbace28-Jan-13 22:45
membersavbace28-Jan-13 22:45 
AnswerRe: Database backup size Pin
Richard Deeming29-Jan-13 1:21
memberRichard Deeming29-Jan-13 1:21 
QuestionSQL Server 2005 Express running slow ? Pin
Member 245846728-Jan-13 15:56
memberMember 245846728-Jan-13 15:56 
AnswerRe: SQL Server 2005 Express running slow ? Pin
PIEBALDconsult28-Jan-13 16:11
memberPIEBALDconsult28-Jan-13 16:11 
AnswerRe: SQL Server 2005 Express running slow ? Pin
Mycroft Holmes28-Jan-13 17:02
memberMycroft Holmes28-Jan-13 17:02 
AnswerRe: SQL Server 2005 Express running slow ? Pin
JOAT-MON29-Jan-13 11:09
memberJOAT-MON29-Jan-13 11:09 
QuestionCombining Data From Temp Tables Pin
Matt U.28-Jan-13 8:46
memberMatt U.28-Jan-13 8:46 
AnswerRe: Combining Data From Temp Tables Pin
David Mujica28-Jan-13 9:13
memberDavid Mujica28-Jan-13 9:13 
GeneralRe: Combining Data From Temp Tables Pin
Matt U.28-Jan-13 9:54
memberMatt U.28-Jan-13 9:54 
GeneralRe: Combining Data From Temp Tables Pin
Jörgen Andersson28-Jan-13 11:18
memberJörgen Andersson28-Jan-13 11:18 
GeneralRe: Combining Data From Temp Tables Pin
Matt U.28-Jan-13 12:13
memberMatt U.28-Jan-13 12:13 
GeneralRe: Combining Data From Temp Tables Pin
Mycroft Holmes28-Jan-13 12:00
memberMycroft Holmes28-Jan-13 12:00 
GeneralRe: Combining Data From Temp Tables Pin
Matt U.28-Jan-13 12:16
memberMatt U.28-Jan-13 12:16 
AnswerRe: Combining Data From Temp Tables Pin
Jörgen Andersson28-Jan-13 22:57
memberJörgen Andersson28-Jan-13 22:57 
GeneralRe: Combining Data From Temp Tables Pin
Matt U.29-Jan-13 2:52
memberMatt U.29-Jan-13 2:52 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160927.1 | Last Updated 28 Sep 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid