Click here to Skip to main content
15,914,419 members
Home / Discussions / Database
   

Database

 
GeneralRe: Set timezone for Database on remote server Pin
AlexeiXX33-Aug-08 16:10
AlexeiXX33-Aug-08 16:10 
GeneralRe: Set timezone for Database on remote server Pin
Mycroft Holmes3-Aug-08 16:41
professionalMycroft Holmes3-Aug-08 16:41 
GeneralRe: Set timezone for Database on remote server Pin
AlexeiXX33-Aug-08 16:49
AlexeiXX33-Aug-08 16:49 
GeneralRe: Set timezone for Database on remote server Pin
Mycroft Holmes3-Aug-08 17:02
professionalMycroft Holmes3-Aug-08 17:02 
GeneralRe: Set timezone for Database on remote server Pin
Ashfield3-Aug-08 20:54
Ashfield3-Aug-08 20:54 
GeneralRe: Set timezone for Database on remote server Pin
AlexeiXX34-Aug-08 5:42
AlexeiXX34-Aug-08 5:42 
GeneralRe: Set timezone for Database on remote server Pin
Ashfield4-Aug-08 9:14
Ashfield4-Aug-08 9:14 
QuestionRetrieving Count from Database Table Pin
Jacob Dixon3-Aug-08 7:36
Jacob Dixon3-Aug-08 7:36 
Ok I created a application that keeps track of our "tickets" at work.
Now they were wanting to add something where it auto assigned the tickets when the user submitted them.

How would I do this in SQL?

I have a "Admin" table:

ID
Name - Name of person
Available - Are they here? (This will be either TRUE or FALSE)
Area - Area that they work (This will be either Telecommunications or System Administrators)

Now I have my other table that when a user submits a ticket it adds it to this table:

"User_Submit" table:

ID
Users_Name
Users_Email
...
...
...
Assigned - (Name of user assigned to (from the Telecommunications or System Administrators branch)
Type - (What it is... will either be Telecommunications or System Administrators)


So when a user submits a ticket I need it to do the following:

Get a count from the User_Submit Table of all names in the ASSIGNED column WHERE the Type = System Administrator.

So lets say:

John Doe - Has 10 tickets
Jane Doe - Has 9 tickets
John Smith - Has 11 Tickets



So how do I search that table and get that Jane Doe has the least amount of tickets. SO then if Jane Doe is available (from the Admin Table) assign it to her.
Otherwise if she is not available assign it to the next person with the least amount of tickets (if they are here)??

???

Ive racked my brain on this... cant figure it out...
AnswerRe: Retrieving Count from Database Table Pin
Vimalsoft(Pty) Ltd3-Aug-08 9:01
professionalVimalsoft(Pty) Ltd3-Aug-08 9:01 
AnswerRe: Retrieving Count from Database Table Pin
Blue_Boy3-Aug-08 10:39
Blue_Boy3-Aug-08 10:39 
AnswerRe: Retrieving Count from Database Table Pin
Jacob Dixon3-Aug-08 15:14
Jacob Dixon3-Aug-08 15:14 
AnswerRe: Retrieving Count from Database Table Pin
Mycroft Holmes3-Aug-08 16:13
professionalMycroft Holmes3-Aug-08 16:13 
AnswerRe: Retrieving Count from Database Table Pin
PIEBALDconsult3-Aug-08 17:17
mvePIEBALDconsult3-Aug-08 17:17 
AnswerRe: Retrieving Count from Database Table Pin
Jacob Dixon3-Aug-08 17:20
Jacob Dixon3-Aug-08 17:20 
QuestionUnable to connect to database Pin
mrkeivan2-Aug-08 23:50
mrkeivan2-Aug-08 23:50 
AnswerRe: Unable to connect to database Pin
Blue_Boy2-Aug-08 23:56
Blue_Boy2-Aug-08 23:56 
GeneralRe: Unable to connect to database Pin
mrkeivan3-Aug-08 11:12
mrkeivan3-Aug-08 11:12 
QuestionHow to give right to other computer Pin
SamrahNed2-Aug-08 21:26
SamrahNed2-Aug-08 21:26 
AnswerRe: How to give right to other computer Pin
Reza Raad3-Aug-08 1:59
Reza Raad3-Aug-08 1:59 
Questionpivot table into anther table Pin
prithaa2-Aug-08 18:23
prithaa2-Aug-08 18:23 
AnswerRe: pivot table into anther table Pin
Mycroft Holmes3-Aug-08 16:20
professionalMycroft Holmes3-Aug-08 16:20 
GeneralRe: pivot table into anther table Pin
prithaa3-Aug-08 19:29
prithaa3-Aug-08 19:29 
GeneralRe: pivot table into anther table Pin
Mycroft Holmes3-Aug-08 19:37
professionalMycroft Holmes3-Aug-08 19:37 
GeneralRe: pivot table into anther table Pin
prithaa3-Aug-08 20:48
prithaa3-Aug-08 20:48 
GeneralRe: pivot table into anther table Pin
Mycroft Holmes3-Aug-08 21:13
professionalMycroft Holmes3-Aug-08 21:13 

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.