Solved

Pullinh out information from a database

Posted on 2004-04-17
3
137 Views
Last Modified: 2010-04-06
OKay, GOt a table in which dates are stored .

This are all the columns and their names:

 Date     Date01     Date02      Date03      Date04      Date05      Date06      Date07      Date08      Date09      Date10
Date11  Date12     Date13      Date14

What I am trying to do isw have an sql statement that runs threw each column to see what is due in 3 days from the date the report is pulled.

Also I have another table named T_employee in which I need to match the agents_ID to pull the phone number and Name out.



0
Comment
Question by:eteran
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:eteran
ID: 10851365
Will a querry like this work in MYSQL statement

SELECT T_Transaction.Agent_ID, T_Transaction.Transaction_ID, T_Transaction.Transaction_Name, T_Transaction.Address, T_Transaction.[Apt:], T_Transaction.City, T_Transaction.State, T_Transaction.Status, T_Transaction.Totalamount, T_Transaction.Totalcommison, T_Transaction.Date14, Month([date14]) AS Expr1, Year([Date14]) AS Expr2, [totalcommison]-([commision_split]*[totalcommison]) AS Expr3, T_Employees.Cell_Number, T_Employees.First_Name, ([commision_split]*[totalcommison]) AS Expr4, T_Transaction.Type
FROM T_Employees INNER JOIN T_Transaction ON T_Employees.[Employment_ ID] = T_Transaction.Agent_ID
0
 
LVL 12

Accepted Solution

by:
venkateshwarr earned 500 total points
ID: 10856702
Looks good... It should work..
0
 
LVL 12

Expert Comment

by:venkateshwarr
ID: 10856718
The problem is with your date... Month() and Year() parts
the query may not work in all the databases
In some databases DatePart function may work
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question