?
Solved

Pullinh out information from a database

Posted on 2004-04-17
3
Medium Priority
?
144 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
  • 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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…
Suggested Courses

809 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