Results 1 to 3 of 3
Thread: SQL Like and Access database
-
01-09-2010, 03:06 PM #1
SQL Like and Access database
Can i do 3 queries and do something like the following:
<cfquery datasource="MasterSQL" username="***" password="***" name="SQLQRY">
Select Employee.Emp_Name, Salary.Emp_ID
From Employee inner join Salary on (Employee.Emp_ID = Salary.Emp_ID) AND (Employee.SectionName = Salary.SectionName)
Where Emp_Name like <cfqueryparam value="%#arguments.search#%" cfsqltype="Sql_VarChar">
</cfquery>
<cfquery datasource="MasterDB" name="AccessQRY">
Select Emp_Pro.Emp_ID
From Emp_Pro
WHERE Emp_Pro.Emp_ID like ("%#ValueList(SQLQRY.Emp_ID)#%")
</cfquery>
<cfquery datasource="MasterDB" name="AccessQRY2">
Select Emp_Info.Desc,
From Emp_Info inner join Emp_Pro on (Emp_Info.Emp_ID = Emp_Pro.Emp_ID) AND (Emp_Info.Con = Emp_Pro.Con)
WHERE Emp_Info.Emp_ID IN
this block will change too...
( <cfqueryparam
value="#ValueList(SQLQRY.Emp_ID)#"
cfsqltype="cf_sql_integer"
list="true">
)
</cfquery>
What do i have to change to make this query work...
-
02-02-2010, 11:37 AM #2
Looks like you've already posted this question multiple times on other forums. Try reviewing the answers you have already!
SQL Tutorials
HTML Code:www.w3schools.com/SQl/default.asp
-
12-17-2010, 05:56 AM #3
Freshman
- Join Date
- Dec 2010
- Posts
- 43
- Thanks
- 0
- Thanked 0 Times in 0 Posts
- Feedback Score
- 0
The Microsoft acess database but the principles elucidated apply equally well to ASP integration with other databaes.Thaks for sharing info.




Reply With Quote

