Results 1 to 3 of 3
  1. #1
    Abina's Avatar
    Abina is offline Master
    Join Date
    Dec 2009
    Location
    United States
    Posts
    1,073
    Thanks
    1
    Thanked 6 Times in 4 Posts
    Feedback Score
    0

    Default 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...

  2. #2
    numberone's Avatar
    numberone is offline Senior
    Join Date
    Jan 2010
    Posts
    623
    Thanks
    0
    Thanked 1 Time in 1 Post
    Feedback Score
    0

    Default

    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

  3. #3
    samson77 is offline Freshman
    Join Date
    Dec 2010
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Default

    The Microsoft acess database but the principles elucidated apply equally well to ASP integration with other databaes.Thaks for sharing info.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Partners: BOSTON WEB DEVELOPER, LLC   |   WEBCOSMO CLASSIFIEDS