eteran
asked on
Pullinh out information from a database
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
the query may not work in all the databases
In some databases DatePart function may work
ASKER
SELECT T_Transaction.Agent_ID, T_Transaction.Transaction_
FROM T_Employees INNER JOIN T_Transaction ON T_Employees.[Employment_ ID] = T_Transaction.Agent_ID