|
|
|
Not sure if Access accepts this, but have a try:
SELECT Employee_ID,
Employee_Name,
count (*) as [Total Days],
(SELECT COUNT(*)
FROM EmpTable e2
WHERE e2.Employee_Name = e1.Employee_Name
AND Attendance_Date BETWEEN ? AND ?
AND e2.Status = 'P')
From EmpTable e1
Where Employee_Name = ?
and Attendance_Date between ? and ?
group by Employee_ID,
Employee_Name
Note, literals are replaced by parameters (read Colin's post).
|
|
|
|
|
Hi Mika Wendelius,
Thanks a lot for your help.Query executes Perfectly with the desired results.
sorry for late reply...
|
|
|
|
|
You're welcome
|
|
|
|
|
Hi all,
I have created windows application in c#, it is Sample.exe,
If this exe is already running, andmeanwhile if double click and initiate one more instance of Sample.exe it should point to already running Sample.exe.
Concept is simple if my windows media player is running say a movie file is being run.
and if I launch media player from shortcut it will still show the already running one instead of opening the separate media player.
Is it possible to do so for my application, how can I apply same logic to my Sample.exe
Thanks,
ashok
|
|
|
|
|
|
I don't see the connection with databases? You should be asking this in the C# forum.
|
|
|
|
|
Sorry for the inconvinience I forgot to change the forum........
ashok
|
|
|
|
|
HI!!
Sory my english is bad!
I work on a topic of management school I created this mcd I wish someone Regad if it is right or not.
I was looking to create a history table for the table CAPITALISE_MODULE and CAPITALISE_SEMESTRE how to define the historical table should I linked to the other table?what are the identifiers.?
Thank you for read me!
Whay can i insert my file mcd?
|
|
|
|
|
I'm sorry, but i really can't understand your question. I don't think that we can help you to define tables when you have only given us the table names, but no other information.
What is an mcd?
|
|
|
|
|
foryou wrote: I was looking to create a history table
If I understand you correctly, the structure of your "history" (or "audit") table will be the same as the source table except you need to add some sort of versioning column in there also. That can be a simple incremented integer, or it can be a datetime, or something else that suits your needs.
To maintain the history you need to add triggers to the source table to copy any updates to the "history" table.
|
|
|
|
|
Thank you very much Colin Angus Mackay and Paddy Boyd.
MCD is Conceptual data model.
whay can i send you my MLD?
|
|
|
|
|
HI!!
if my table history will be as my table source so my table history is: (id_student, id_module, id_validat_module, note)
or informations about students are in student table.
if I want to select students in their history with name_etudiants
I have to link the history table to student table?
Thanks
|
|
|
|
|
Hi all...
I am developing an application completely in MS_ACCESS. I have my project and the Access database at different locations e.g C:\ & D:\ resp.
Now i want to fill the combobox with two Columns Srno, Name. Here "Srno" is Should be hidden Column.
Help me how would I do it..
Thanks & Regards..
modified on Monday, February 2, 2009 7:11 AM
|
|
|
|
|
Why 2 Fields?
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswam@its.co.za
|
|
|
|
|
Do you want to display two fields in same time in combobox?
If yes then use query like this select srno+' '+name as FiledforCmb from tablename
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Hi all,
I'm suprapto, I would like to ask how to query the table below,
based on the highest salary of each department. The table's name is Employee
EmpName Dept Salary
------- ------- -------
Blee Technic 10000000
Mawar Technic 2000000
Suprapto Prod 1000000
Edo Prod 2000000
P Thomas Technic 6000000
P Hank Prod 5000000
Bu Putri HR 20000000
Franky Technic 3500000
Rahel HR 4000000
So, what I expect to obtain for the result is like below:
EmpName Dept Salary
------- ------- --------
Blee Technic 10000000
Bu Putri HR 20000000
P Hank Prod 5000000
Could anyone help me to solve this problem ?
Your kind help is much appreciated.
Rgards,
|
|
|
|
|
For example something like:
SELECT *
FROM Employee e1
WHERE NOT EXITS (SELECT 1
FROM Employee e2
WHERE e2.Dept = e1.Dept
AND e2.Salary > e1.Salary)
|
|
|
|
|
The query is error, I'm working with SQL server 2005
|
|
|
|
|
There seems to be a typo in the text. Instead of NOT EXITS write NOT EXISTS. If you get another error, please include the error text in the post.
|
|
|
|
|
what is the meaning of unicode in sql?
|
|
|
|
|
waqarnaeem2@hotmail.com wrote: what is the meaning of unicode in sql?
The same as it means elsewhere I would presume. It is a form of character encoding.
|
|
|
|
|
well i have read that ,clustered index is 1 in table ,they match the physical & logical records, so what nonclustered index is more than 1 in a table, How they work?? then they increase the congestion 2much?
& y prefer 1 to another in what sense?
there is confusion.. plz reply
|
|
|
|
|
waqarnaeem2@hotmail.com wrote: there is confusion
Indeed there is. I'm having some difficulty parsing your question.
waqarnaeem2@hotmail.com wrote: clustered index is 1 in table
There can only be one clustered index in a table.
waqarnaeem2@hotmail.com wrote: they match the physical & logical records
The physical rows kind of follow the clustered index. It isn't exact, but the general idea is that the rows are physically sequenced by the clustered index however, SQL Server performs many optimisations that means that it doesn't follow that except in the simplest of circumstances.
waqarnaeem2@hotmail.com wrote: so what nonclustered index is more than 1 in a table
You can have many non-clustered indexes on a table.
waqarnaeem2@hotmail.com wrote: How they work??
The same way as an index in a book. The non-clustered area consists of a number of pages which contain look up information that can be used to find the physical rows faster than you would be able to if you had to scan the whole table to find the same information.
waqarnaeem2@hotmail.com wrote: then they increase the congestion 2much
What congestion? They will requires a little more IO for the lookup, but the idea is that the extra up-front work pays off as you can find the actual data much faster and using less IO overall. In some queries there may even be enough information in the index to never need to look at the physical rows at all. This makes everything much faster and less congested.
However, when you insert, update or delete from a table with non-clustered indexes you have to remember that SQL Server will also have to update the indexes as well as the actual physical row.
waqarnaeem2@hotmail.com wrote: y prefer 1 to another in what sense?
If you want more than one index on a table then you have no choice as you must use a non-clustered index at some point. Typically the clustered index is on your primary key
|
|
|
|