CF query fails in the CF, but works in SQL Server

I have the following cfquery which fails in CF and sql in the error code is exactly the same as those listed here and works very well when placed in sqlserver...

code will work when this section is deleted:

and t.EmployeeNumber in

(select std_user_id

of HED.dbo.EDD_CPR_EMP

where TERMINATION_DATE is null)

Why it does not work with above the code and how to make it work?

my code:

< html >
< head >
< title > retrieve data from database < /title >
< / head >

< body >

<!-Game-> Datasource (s)
< cfset intellex_datasource = "In Intelex" >

< CFQUERY NAME = "get_data" datasource = "#intellex_datasource #" >

Select distinct
c.CourseTypeName Type,
Substring (s.WorkGroupName, 1, 2) Dept,
t.EmployeeNumber Win2k,
t.FirstNam FirstName,
t.LastName LastName,
a.CourseName courses,
b.NextDate NextDate
trnTraining a, trnEmployeeTraining b, trnCourseType c, trnEmployeeWorkgroup r, trnWorkgroups s, sysEmployee t
where b.PriorityId = 'Y '.
and a.CourseId = b.CourseId
and a.CourseTypeId = c.CourseTypeId
and c.CourseTypeName = 'MS '.
and r.employeeID = b.employeeID
and r.employeeID = t.employeeID
and t.EmployeeNumber in
(select std_user_id
of HED.dbo.EDD_CPR_EMP
where TERMINATION_DATE is null)
and t.deleted is null
and r.workgroupID = s.workgroupid
and len (s.WorkGroupName) < = 2
and b.NextDate > = getdate()
order of t.LastName, t.EmployeeNumber, a.CourseName
;

< / cfquery >
< h4 > used data based on criteria of form < / h4 >
< cfoutput query = "get_data" >

#Get_data.type #, "Check it", #Get_data.win2k # < br >

< / cfoutput >

< / body >
< / html >

CF_newtome wrote:

-Looks like CF is unable to manage a sql to access two different databases?

CF can do, but I guess that the credentials that you use in the CF data source where is the problem.

Connect to SQL Server in SQL Server Management Studio by using the same credentials used by the data source and test your query.

See you soon

Eddie

Tags: ColdFusion

Similar Questions

  • iPad flashing constant Air... can't even thug off the coast.  Upgrade the software, but worked for a while.  Can't do anything else.

    iPad constant Air flashing... cannot even turn off.  Upgrade the software, but worked for a while.  Can't do anything now.

    MY husband fixed this problem by pressing power and home buttons.  Duh...

  • Windows Update failed - error 0 x 80070643 for Microsoft SQL Server 2005 Express Edition Service Pack 4 (KB2463332)

    Original title: Windows Update Failed - need help

    Vista 32 Ultimate with all updates, until this one: update Windows failed: error 0 x 80070643 for Microsoft SQL Server 2005 Express Edition Service Pack 4 (KB2463332). Update has failed repeatedly.  I tried to restart, remove the update (even by deleting the file so it would download it again) and install again.  Nothing has worked.  Error 80070643.  Since it is not Office 2003, the error seems to mean a problem with the Windows .NET framework.  Don't know what that means.

    Looking at KB976982, I tried to fix MSI software update registration corruption issues (whatever that means) by running the automated Fix It by KB971187. Restarted, I tried Windows Update again.  Still didn't update.

    Then, I waited two days and tried again.  Even that did not help.

    I tried bypassing Windows Update simply by downloading and then run the file SQLEXPR32.exe from Microsoft downloads. Did not work at all. I then tried to run it as an administrator (even if it was already an administrator account, with no other account on this computer at all).  He started to run and then gave me the following error message: unable to run the SQL Server System Configuration Checker due configulation WMI on the computer.  Error: 70347 (0x112cb).

    Now I'm really confused.  On the one hand, 80070643 means I probably repair the .NET framework, which certainly, I hate to do because I need several versions of the .NET framework first uninstall and then try to install the compmonents, and I'm afraid something would go wrong.

    On the other hand, the 70347 (0x112cb) error message seems to indicate the problem is completely different and has to do with WMI, which probably has to do with permissions and I have no idea how to solve this problem.  (And why it all of a sudden would be any problem with permissions?)  This computer is not on a corporate network and has only one user account, the administrative account).  I have looked at Services and Applications in computer management, where there are WMI control, but nothing shown that I can possibly change and not the SQL Server Configuration Manager under it, which doesn't seem to have much either.

    Help!  Please...

    And now I also tried to fix it, just in case where, the .NET framework (Panel > programs and features > Microsift.NET framework Client profile 4 > uninstall/change > fix it), and the Windows Update tried again (including reboot).  Still no.  Everything I try, it is not to do nothing, pardon my language.  People smarter than me, pleasehelp!

    Hi stupID_,

    «Error 0 x 80070643 for Microsoft SQL Server 2005 Express Edition Service Pack 4 (KB2463332).» Update has failed repeatedly. »

    As the error relates to SQL, perhaps this forum:

    SQL Installation of Server & upgrade
    http://social.msdn.Microsoft.com/forums/en-us/sqlsetupandupgrade/threads/

    TaurArian [MVP] 07/01/2005-30/06/2011. The information has been provided * being * with no guarantee or warranty. What works for some, may not always work for others.

  • How to access a certain date in the date and time field SQL Server

    I have a field named job_date in a table in my database of the 8 SQL Server.

    The data type is datetime.

    Thus, the values for the fields as the 2013-03-11 15:55:52.000 look.

    How to query this field to include only the values of a certain date?

    For example

    < cfquery name = "get_job_name" datasource = 'abc' >

    SELECT FROM job_info job_date WHERE Job_name = March 12, 2013"

    < / cfquery >

    When I query the field now I get NO RECORDS.

    This is because as the fields like this 15:55:52.000 2013-03-11. instead of this March 12, 2013"

    How to access a certain date in the date and time field SQL Server when its formatting as this 15:55:52.000 2013-03-11. ?

    where job_date > = TheDateYouWant

    and job_date<>

    In addition, the format is irrelevent.  The only issue of date formats time is when you want to display.

  • Error code: 0x84BC089B, you try to run the service pack 1 for SQL Server

    Original title: Error Code: 0x84BC089B

    Received error code: 0x84BC089B tries to run the service pack 1 for SQL Server Express 2008R2.

    Hello J lesow,

    The question you have posted is related to SQL server and would be better suited on the TechNet support forum. I suggest you to post the question on the following link.

    http://social.technet.Microsoft.com/forums/en-us/category/SQLServer

  • The following HTTP requests fail in the Simulator, but not on the device (4.2.1)

    Anyone had this problem before?  I do a HTTP request and then according to the return add another to my queue and the other repeatedly fails on the Simulator.  However, I tried to run on the device and everything worked perfectly.  I know this is a pretty vague description, but I was wondering if there was any problem known about.  He could make debugging in the simulator that is very difficult in the future.

    marchywka, I think it has something to do with the WiFi in the Simulator.  It works the first time, but in certain circumstances later fail.

    I couldn't understand it, but I decided to not use WiFi when it is the Simulator and use WiFi on the device.

  • computer can not find the microphone, but worked before...

    ORIGINAL TITLE: microphone

    my computer cannot find the microphone. but the strange thing is that it worked before. now I don't him is nowhere Ive looked all over my computer.        PLESE HELP!  EVERYONE!

    Right-click in the empty space below the 'Line In' device and check both boxes to show hidden and disabled devices.

  • App hangs on the device, but works well on Simulator

    Hello! Last week I had an approved app and it is already in place in the BlackBerry App World. Before being approved, he rejected once, the e-mail message noted that "when testing your app on BlackBerry Z10, I found that he was unable to throw."

    I replied stating that the app has worked very well in the Simulator and asked some tips to solve the problem. It seems that the application got reparsed as overnight has been approved.

    Today, I had the chance to test my application on a real device and I found it crashed right after the launch.

    I don't know what could be wrong with my application. I'm guessing that the reason of this problem could be something similar to this thread; but I think I'm not directly joking with the camera in my code, everything is built on Air.

    Could you point me in the right direction please?

    Thank you in advance!

    What version of the OS is the device running?

    AIR 3.5 is not supported up to 10.2, which is not available to consumers right now better I know.

    If the camera is turned on between 10.0 and 10.1, check that your application - app.xml file appeals to AIR 3.1 namespace and not the AIR 3.5 namespace.

  • laptop stops shortly after the start, but works well in safe mode / command after chkdk or ckdsk/r

    Problem 1: There are months, my two year old Toshiba Satellite L655 s5096 started losing charge the battery even when it is plugged.
    Sometimes, the problem was solved by using a different wall outlet. I replaced the battery, but eventually the problem comes back.

    Problem 2: at the same time that the problems loading starts, Windows has stopped booting normally. Sometimes repair or restoration leads to a normal start, but sometimes I run Chkdsk/r (Chkdsk sometimes the only works [!]) Mode through safe mode w/Command Prompt.

    Problem 3: There are two days of problems 1 and 2 reappeared, but a few minutes after that Windows starts, my machine stops, even if I am able to run Wndows in Mode safe mode w/network.

    I am correct in surmising that this isn't a motherboard (hardware) problem? I don't really want to have to replace this machine if I don't have to. Is this a Windows problem? Upgrade to Windows 8 would solve the problem? Or is it the result of the virus that escaped my Avast scans?

    I'll install Windows 8 when I checked my automatic online data storage works.

    Hi Denise,

    Thanks for posting your question in the Microsoft Community forum.

    I understand that the computer shuts down shortly after starting. I'll help you with this problem.

    1. what security software is installed?

    2. are you sure the workload problem is not limited to a faulty wall unit?

    3. have you checked with the manufacturer of the computer if it is not a battery problem?

    To resolve this issue, let us try these methods:

    Method 1.

    You can create a new power plan and check if that helps.

    Power plans: frequently asked questions: http://windows.microsoft.com/en-ca/windows7/power-plans-frequently-asked-questions

    Method 2.

    Keep the battery power: http://windows.microsoft.com/en-ca/windows7/conserving-battery-power

    Method 3.

    You can remove the battery and connect the power cable from the wall cabinet and check. If the computer does not stop after the restart, then it might be a problem with the battery.

    For any question related to Windows, please do not hesitate to contact us and we will be happy to help you.

  • Start button on the taskbar, while opening with the mouse, but works using the touch screen does not

    Windows icon on the taskbar does not bring up start page using the mouse, but will Touch. Clickable after the restart, but only for a couple of times?

    Hello

    Please contact Microsoft Community. I understand that start button on the taskbar does not not at the opening with the mouse, it works but when touch use. I've surely you will help solve this problem.

    To better understand the issue, I would need more information on your side.

    1. The problem occurs when you use another mouse?
    2. What is the number and the model of the computer and the mouse?
    3. Did you the latest changes on the computer before this problem?

    This problem might have occurred because of these reasons:

    1. Missing updates of Windows and the device driver updates.
    2. Conflict between third-party applications.
    3. Corrupt system files.

    Try the steps listed here and see if it helps:

    Method 1:

    If the problem does not occur when you use another mouse, I suggest you to download and install all Windows Update available including optional updates. You can also install the last mouse driver\Software from mouse manufacturer website and check if it helps.

    Method 2:
    If the problem occurs when you use a different mouse, I suggest to start the computer using safe mode and check if the problem occurs or not. If this isn't the case, I suggest you put the computer in a clean boot state and check if it helps.

    Step 1:
    Start the computer in Mode safe. At the start of the computer Mode safe with the minimum set of drivers and files.

    Start settings for Windows (including safe mode)
    http://Windows.Microsoft.com/en-in/Windows-8/Windows-startup-settings-including-safe-mode

    Step 2:
    If the issue happen not in Mode without failure, perform a clean boot and check. Setting the system in a clean boot state will help you determine if third-party applications or startup items are causing the problem.

    How to perform a clean boot in Windows
    http://support.Microsoft.com/kb/929135/en-us

    Note: After the clean boot troubleshooting steps, see the "How to reset the computer to start as usual after a clean boot troubleshooting" section in the link provided to return the computer to a Normal startup mode.

    Method 3:

    If the problem persists, I suggest you perform the Scan SFC (System File Checker) and check if it helps. SFC scan will search the system files corrupted on the computer and replace them.

    Use the System File Checker tool to troubleshoot missing or corrupted on Windows Vista or Windows 7 system files
    http://support.Microsoft.com/kb/929833

    Hope this information helps. Reply to the post with an up-to-date report of the issue so that we can help you further.

  • Tecra A8 PTA83E - sound in the speakers but work helmet

    Hello

    I recently reinstalled my laptop with a new copy of Windows xp pro. After installing all the drivers where installed correctly, but I have no sound.

    When I put my helmet I can perceive a very low noise.

    Tried almost everything posted on the forums but no luck.

    Someone at - it solution

    Kind regards

    > When I put my helmet I can perceive a very low noise.
    This means that the pilot is ok and possibly that the volume should be increased

    Reach:
    (1) control Panel-> sounds, speech, and Audio Devices section
    (2) select sounds and Audio devices
    (3) sound now and the Group of devices Audio will appear.
    (4) in reading his article click Volume
    (5) in the control of the Volume Group on all controls volume max (foot)

    If this does not help, check out this FAQ from Toshiba:
    http://APS2.toshiba-tro.de/KB0/TSB7C021B0001R01.htm

  • Cannot install the update of security for SQL Server 2005 Service Pack 3 (KB970892) _

    I get the guests to install this important update, but it will not be installed. I followed the instructions of troubleshooting for error 737D, but it does not work.
    Any suggestions?

    Error code when you use Windows Update or Microsoft Update to install updates on a computer on which SQL Server 2005 installed: "0x737D."
    http://support.Microsoft.com/kb/978597

    Visit the Microsoft Solution Center and antivirus security for resources and tools to keep your PC safe and healthy. If you have problems with the installation of the update itself, visit the Microsoft Update Support for resources and tools to keep your PC updated with the latest updates.

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • DB Link using the gateway to Oracle to SQL server 2005

    Hi all

    I am facing problems to configure the gateway for Oracle database to connect to SQL server, given below are details:

    Machine has
    ----------------
    OS = Windows server 2008 R2 64 bit
    DB = Oracle 10.2.0.5 64-bit

    content of C:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\*tnsnames.ora*

    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = WIN-G9TJ5GM2SAO)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    )
    )

    dg4msql =
    (DESCRIPTION =
    (ADDRESS =
    (PROTOCOL = TCP)
    (HOST = 10.1.87.119)
    (PORT = 1521)
    )
    (CONNECT_DATA =
    (SID = dg4msql))
    (HS=OK))

    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    )
    )

    Machine B
    ----------------
    OS = Windows Server 2003 32-bit
    DB = SQL Server 2005 32-bit
    Gateway = Gateway Oracle 11 g 32 bit

    Content of C:\product\11.2.0\tg_1\dg4msql\admin*\initdg4msql.ora*

    HS_FDS_CONNECT_INFO = localhost:1433 / / SDÉS
    HS_FDS_TRACE_LEVEL = OFF
    HS_FDS_RECOVERY_ACCOUNT = RECOVERY
    HS_FDS_RECOVERY_PWD = RECOVERY

    Content of C:\product\11.2.0\tg_1\NETWORK\ADMIN\*listener.ora*

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = eZeePay-DB)(PORT = 1521))
    (ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC1521))
    )
    )

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = dg4msql)
    (ORACLE_HOME = C:\product\11.2.0\tg_1)
    (PROGRAM = dg4msql)
    )
    )

    ADR_BASE_LISTENER = C:\product\11.2.0\tg_1

    On computer A, if I use TNSPING it gives below error

    C:\users\administrator > tnsping dg4msql

    AMT Ping Utility for 64-bit Windows: Version 10.2.0.5.0 - Production on 12-MAR-2
    012 11:44:12

    Copyright (c) 1997, 2010, Oracle. All rights reserved.

    Use settings files:
    C:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora

    AMT-03505: failed to resolve the name


    Please please help what's not in configurations!

    Best regards!

    Irfan

    Published by: irf_mas on March 12, 2012 12:47 AM

    Hello Irfan,
    As far as I can see the correct air configuration files, but you can check a few things-

    1. they may have been lost when posting in the forum, but can do you that there is a space at the beginning of each line in the tnsnames.ora and listener.ora except for the first line of each section-

    ORCL =

    dg4msql =

    EXTPROC_CONNECTION_DATA =

    LISTENER =

    SID_LIST_LISTENER =

    2. What is in the file sqlnet.ota on the computer has?

    3. host 10.1.87.119 is the machine eZeePay-DB?

    4 is the gateway listener began the eZeePay DB?

    Kind regards
    Mike

  • Why is a user with the DBA privilege necessary side SQL Server to migrate?

    Greetings

    Project to migrate a SQL database to Oracle using SQL Developer.

    The docs say that a user with DBA privileges is required in the SQL Server database when you run the migration of the side Oracle.

    Why?

    Why a user with only READ access to SQL Server data would be necessary?

    Thank you very much!!

    -gary

    The DBA privilege at the source database is required because SQL Dev Migration is also collect information from SQL Server system tables, which a normal user is not always possible to query. It is mandatory that the migration is trying to build an Oracle schema which corresponds as much as possible the source database.
    But this requires having become DBA in the foreign database to avoid permission problems. If you SQL Server admin does not want the DBA privilege, you can also do a Migration offline - here the ADMINISTRATOR must run the generated scripts offline in-> Migration-> 3rd capture in the database offline party

  • Unable to kenza link to download the Patch MS02-061 for SQL Server 2000

    original title: can not download Patch MS02-061

    Hello

    I know this is an old patch but our new VPN software was listed as a patch that is required if SQL Server 2000 is installed.  I get out the site and I am unable to download.  Telling me that it can't find it when I click on the link:

    http://support.Microsoft.com/default.aspx?scid=kb;en-us;316333&SD=Tech

    It is on the page: http://www.microsoft.com/technet/security/bulletin/ms02-061.mspx

    This is supposed to be the patch that replaces MS02-039.

    Thank you!
    Ryan

    Visit the Microsoft Solution Center and antivirus security for resources and tools to keep your PC safe and healthy. If you have problems with the installation of the update itself, visit the Microsoft Update Support for resources and tools to keep your PC updated with the latest updates.

    You will find appropriate support for SQL Server in this forum: http://social.msdn.microsoft.com/forums/en-US/sqlsetupandupgrade/threads

Maybe you are looking for