Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3239380
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:57:47+00:00 2026-05-17T17:57:47+00:00

SELECT e.firstName,t.setDate, w.wageAmount FROM TimeSheet t INNER JOIN Employee e ON e.employeeID = t.employeeID

  • 0
SELECT  e.firstName,t.setDate, w.wageAmount
         FROM TimeSheet t
         INNER JOIN Employee e
         ON e.employeeID = t.employeeID
         INNER JOIN Salary s
         ON s.salaryID = t.salaryID
         INNER JOIN Wage w
         ON w.wageID = s.wageID
         INNER JOIN EmpHiringInfo ehf
         ON ehf.EmpHiringInfoID = s.EmpHiringInfoID
         INNER JOIN WageType wt
         ON wt.wageTypeID = w.wageTypeID
         WHERE (wt.wageTypeID = 19) AND (ehf.isActive = 1 AND s.isActive = 1
         AND ehf.employeeID = 300) AND (CONVERT(varchar, t.setDate, 23) BETWEEN '2000-08-02' AND '2020-08-04')

By the way, the wage is only one for every month, so the wage is repetitive. So for the month 11,2010 wage is 3600 regardless how many days in 11,2010 …

The above sample produce the following sample code:

alt text

I need to gather all similar month/year into one cell discarding days and time. For example
2010-11-12 and 2010-11-26 has to be contracted to one cell as 2010-11 (in any format).

Any help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T17:57:48+00:00Added an answer on May 17, 2026 at 5:57 pm

    To Unify all the dates to months you can do something like this:

    dateadd(mm,datediff(mm,0,t.setDate),0)
    

    But you will need to group by this is you want to do aggregations:

    select e.firstName,dateadd(mm,datediff(mm,0,t.setDate),0), sum(w.wageAmount)
    from ...
    group by e.firstName, dateadd(mm,datediff(mm,0,t.setDate),0)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This query SELECT FirstName, LastName, NCAAStats.AccountId, College_Translator.school_name, StatTypeId, COUNT(*) AS 'Count' FROM NCAAstats INNER
I have a simple query in php on oracle: $query='select u.username,u.lastname,u.firstname,c.event,c.reason from users u,
Is their a reason I cannot do Select Firstname + Lastname from Person When
I have a SQL select statement like this: select FirstName, LastName, Age from People
this SQL statement select firstname,lastname from users where lastname in('foo','bar') group by firstname it
try { PreparedStatement s = (PreparedStatement) conn.prepareStatement(SELECT voters.Check,count(*) FROM voting.voters where FirstName=+first+and LastName=+last+ and
Is this SQL statement legal? SELECT firstName, lastName FROM Presidents WHERE (endTerm-beginTerm)>4; I need
function fullname($id){ $query = mysql_query(SELECT firstname, lastname FROM users WHERE id = '$id'); $row
The query that im using is SELECT firstName + ', ' + lastName FROM
I have a right outer join, that almost does what I want... SELECT users_usr.firstname_usr,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.