var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: MSSQL database
I'm working on a project for a work agency in the Netherlands.I made a java application for the workers to see what time they work at which company and which car they have to take to get there.
I want to retrieve this information from a MSSQL database into my java app into jtabels. The only problem i have is the MSSQL query to accomplish this.
These are the tables in my mssql database on a ms sql server:
My goal for now is to select ALL from tbl.car where Employee_ID is "myID" and Assigment_ID is one of the maximum 2 IDs there are for a certain Employee.
Every Employee can work at more companies and every company has more employees. For every company there can be more cars assigned to it.
I have to finish this project soon and i really don't know how to fix this.I hope you guys can help me...
ps. if you want more details let me know....
please explain this in more detail
Originally Posted by mitgeld
I mean with this that every employee can have more assignments to his/her name. I want to show all those assignments but not in the same table. The ID's for this assignments are random ints.
i hope you understand and can help me. i really have to finish this soon. and any help would be great.
i still don't understand the "maximum 2" part
maybe you could describe what you want by giving sample rows for each of your tables, and then showing what the results should be from the query for the sample data
the maximum assignments there are for one employee is 2.
i will make you an example now, i ll post it in a bit
example table and results
my first attachment to this post is an example off my database.
the second one is is an example of the result i want to get.
as you can see there are 4 tables, 2 for the employees assigments and 2 for the transportation to that assigment. here you can see what i ment with 2 assigment for 1 employee.
every employees logs in in my java app and will have a overlook where they have to work, with who and how he/she will go there.
i really hope you can help me. thanks
please do me a favour and export your spreadsheet to a text file, not an image
its readable like this.
can you please help me