Solved

Pullinh out information from a database

Posted on 2004-04-17
3
134 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 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem with Connection / Parameter: 4 21
jQuery Date picker not working 16 132
Problem to ToolkitScriptManager 2 61
Facebook React and SyntheticEvents 6 67
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…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn how to count occurrences of each item in an array.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

803 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