Problem, out the second table based on ID in the first table data

Hi everyone: I was stuck for a few days to a few questions. And here's one:

I have a table of COURSE. I also have a summary of COURSES which displays all courses and related information page.

When a user clicks on a specific course he will lead them to a page of details for this specific courses. PROBLEM: Everything works well except: I have a separate table that contains information of teachers. The two tables are related by The Primary Key (PERSONNEL_ID) in the table of teachers (called PERSONNEL_LISTS) and MT_ID in the COURSES TABLE. I don't want the MT_ID to be displayed on the details page: I have teachers want first and last name.



Here are two tables:

http://www.coolflasher.com/Courses_table.gif

http://www.coolflasher.com/Personnel_table.gif

The SQL that is currently used on the course detail page is:

< name cfparam = "URL. Default COURSE_ID"="-1 ">".
< name cfparam = default 'URL_COURSE_ID' = '#URL. COURSE_ID #">"
< cfparam name = default 'SESSION._Insert_COURSES' '-1' = >
< name cfquery = "CLASS" datasource = "SCHEDULING_TRACKER" >
SELECT *.
COURSES
WHERE COURSE_ID = < cfqueryparam value = '#URL. "COURSE_ID #" cfsqltype = "cf_sql_numeric" > OR (-1 = < cfqueryparam value = "" #URL_COURSE_ID # "cfsqltype ="cf_sql_numeric"> AND COURSE_ID = < cfqueryparam value =" #SESSION._Insert_COURSES # "cfsqltype ="cf_sql_numeric">")
< / cfquery >

And I'm out of the MT_Code: cfoutput > #COURSES.MT_ID # < / cfoutput >

I tried to add the table PERSONNEL_LISTS of the request, but I can't figure how to get it out of the column FIRST_NAME and LAST_NAME that correspond with the MT_ID in the table of COURSE. Table of courses

Do not use select *.

The two most common ways to join the tables are:

FROM table1 join table2 on table1.somefield = table2.somefield
and
FROM table1, table2
where table1.somefield = table2.somefield

Your code example doesn't have.

Tags: ColdFusion

Similar Questions

  • I had many problems with the first cc 2014 so I reinstalled it and now it says that I can not open my project because it was recorded on a newer version. Is there something I can do?

    I had many problems with the first cc 2014 so I reinstalled it and now it says that I can not open my project because it was recorded on a newer version. Is there something I can do?

    Hi Gemma,

    It seems that after reinstalling, Premiere Pro no has not been updated to the latest version. Check your application creative cloud for updates. If she says Premiere Pro is up to date, try to update Premiere Pro through help > updates... option in Premiere Pro.

    Thank you

    Regalo

  • Dynamics Processor Calc does not reach more than [100] ESM blocks during the calculation, please increase the CalcLockBlock setting, and then try again (a small data cache setting can also cause this problem, check the size of data cache setting).

    Hello

    Our environment is Essbase 11.1.2.2 and work on Essbase EAS and components of Shared Services. One of our user tried to execute the Script of Cal of a single application and in the face of this error.

    Dynamics Processor Calc does not reach more than [100] ESM blocks during the calculation, please increase the CalcLockBlock setting, and then try again (a small data cache setting can also cause this problem, check the size of data cache setting).


    I did a few Google and found that we need to add something in the Essbase.cfg file as below.

    Dynamics Processor Calc 1012704 fails to more blocks ESM number for the calculation, please increase the CalcLockBlock setting, and then try again (a small data cache setting can also cause this problem, check the size of data cache setting).

    Possible problems

    Analytical services cannot lock enough blocks to perform the calculation.

    Possible solutions

    Increase the number of blocks of analytical Services can allocate to a calculation:

    1. Set the maximum number of blocks of analytical Services can allocate at least 500.
      1. If you are not a $ARBORPATH/bin/essbase.cfg on the file server computer, create one using a text editor.
      2. In the essbase.cfg folder on the server computer, set CALCLOCKBLOCKHIGH to 500.
      3. Stopping and restarting Analysis server.
    2. Add the command SET LOCKBLOCK STUDENT at the beginning of the calculation script.
    3. Set the cache of data large enough to hold all the blocks specified in the CALCLOCKBLOCKHIGH parameter.

    In fact in our queue (essbase.cfg) Config Server we have given below added.

    CalcLockBlockHigh 2000

    CalcLockBlockDefault 200

    CalcLockBlocklow 50


    So my question is if edit us the file Essbase.cfg and add the above settings restart services will work?  and if yes, why should change us the configuration file of server if the problem concerns a Cal Script application. Please guide me how to do this.


    Kind regards

    Naveen

    Yes it must *.

    Make sure that you have "migrated settings cache of database as well. If the cache is too small, you will have similar problems.

  • SWITCH UPWARDS A NOTICE + PRIVACY PROBLEM WHEN THE FIRST SCREEN LOCK

    Hi all

    I have an Iphone 6 and since I did the update for IOS 10, I have a few problems:

    I can't pass up a push notification when arrive on the screen with your finger, the little thing do missing since (I also have an iphone 5s and I can still do it, also with 10 IOS installed on it) is so very strange to me, I tried to change phone etc... but nothing to do.

    Then, my second problem is confidentiality on the first screen of the phone lock. When I receive an email from outlook, for example, anyone who does not know my zaihon can open, reply, delete, even for the notification of whatsapp etc...

    If anyone knows that a solution would be very nice to share.

    Thanks in advance,

    Maud

    You can disable the mail view in the screen to notify in settings/Notification Center / Mail:

    Use the Notifications on your iPhone, iPad and iPod touch - Apple Support

    You can also delete the Widget for this:

    Use Widgets on your iPhone, iPad and iPod touch - Apple Support

  • Fill out the template online DATE of a cell function

    More on this thread: fill format identical to another cell, I would like the test to check the date in my column 'A' to see if it is today, and if this is the case, change the background of the whole line (or the selected cells in the same row). Anyone following is the original script which simply checks the test for a numeric value cell, can help adapt to check 'today '?

    the value testCol to 4 - column D

    the value theKeys to {'1', '2', '3', '4'}

    -have a key for each possible value in testCol, surrounded by quotation marks

    the value theColors to {'yellow', 'gray', 'orange', 'blue'}

    -the order here is significant: yellow if the value is 1, if gray 2, etc. - and have a color for each possible value in re

    say application "Numbers".

    say document 1 to say sheet active

    the value t of first table whose class of extended selection is carried

    Repeat with I from 2 to the County t lines - 2 to pass the header line

    tell you s line I

    value formatting the value v in his cell testCol

    If v is in theKeys then

    the value v point of its background color of theColors

    end if

    end say

    end Repeat

    end say

    end say

    Hi Rusto,

    SGIII script should meet your needs with minor modifications in the script (change of the values defined in the first three lines) and adding a separate test column which displays the date in the column and produces a number saying that the color to apply to each line.

    NOT tested. The script is written for 3 numbers (current version). It returns a syntax error on "...". "for say active sheet" when I try it on a version 2 of numbers.

    SG will probably soon as well as a version.

    Add a column to your table to serve the condition column.

    1. Revise the first line of the script to match the number of the condition column.
    2. Revise the second line to read: theKeys {'1', '2'} value
    3. Review the following script steps lie: the value theColors to {'white', 'red'}

    Put this formula in line 2 of the new test column: = IF (A2 = TODAY (), 2, 1)

    Fill the formula down to the condition column.

    Notes:

    -the formula checks again to a numeric value. The numerical value (1 or 2) is provided by the formula - 1 if the line is not dated today, 2 if it is.

    -' white' and a trigger for the 'white' value are included so that the script 'Cancel' 'red' change when it is run on a day after a previous "today."

    Kind regards

    Barry

  • Problems with the transmission of data between the screws

    Hi all.

    I have a question where my program slows considerably during the race.

    The program is a producer-consumer, where I have the main consumer loops and loops producer for USE comms, measure the output power, input for measuring the power, thermal control, etc..

    Regarding the issue, the measures of output loop takes readings and transmits the data to a separate VI which remains running (measure of output processor). This VI summarizes and on average the data and also displays data for the operator to see details if necessary. The operator shows and hides the front panel of this VI with a button on the main program. This VI also returns the summary data to the main VI, where it is read by my loop of consumer.

    The main measures output VI loop takes about 200mS to run when the program is first started. Less than a minute, it is 400 MS, and it's all downhill from there.

    I've isolated the problem to the way I pass data back (I think). I couldn't find a way to pass the reference of the queue between two screws not connected by wires. I open a reference to the VI processor and use Ctrl Val.Set and Get to pass the data back. If I take the intersection of the Subvi data, there is no slowdown.

    My questions are:

    (1) why the data passing by invoking a node of the control on the target would cause the downturn?

    (2) how would I get/pass information of queue between the two screws are not connected?

    (3) Alternately, could I start the VI processor in my main program, run and pass data in and out of it? I want to keep it running, because it is also part of the user interface.

    I don't know that I have not explained this very clearly. I took some screenshots of my code, but don't see how to download here.

    Thanks in advance,

    Jim


  • Problem with the acquisition of data on XP Embedded

    Hello

    I'm using LabView 8.5, 8.7 DAQmx. My application is collection of data of NI USB-6009 14bits. I tried to create applications for tablet PC with installed Windows Xp Embedded. I created the installer on tablet with installed Windows 2000.  I solved all the problems that occurs during installation. First version of the program have assistant DAQ in a main VI who collect and process the data. It worked properly on Xp Embedded. Second version was split into two of the Subvi. One is data collection and secondary processing. Each VI have own while loop. Both Subvi is placed in the large loop and they start at the same time. I am writing all the data to global variables. On PC with the windows application created 2000 worked properly. Error occurs when I moved it to Xp embedded. VI, which is the collection of data, the error see the 200361 code and text:

    DAQmx reading (analog 1-d Wfm NChan NSamp) .vi:2
    The task name: _unnamedTask<0>

    I know its something with the sampling and the clock, but I do not see where is the problem. In the main loop and two Subvi I 'wait until the next ms Multiple"block with a value of 200. DAQ Assistant were set as follows:

    Price: 1000

    Number of samples: 1000

    Timeout (s): 10

    Can you tell which can cause this error?

    If you would like more information please write here.

    Problem solved. There was connection between PC and USB-6009. Program works when I connect the USB-6009 housing directly to the PC. Previous connection was through usb hub.

    Thanks anyway.

  • The problem in the first reading

    Hello

    First of all, sorry for my English.

    I have a problem when I play any video in the timeline. Head playback jumps back a picture, then returns to his post to play correctly. It is normally a back flip of an image and then returns and reading.

    My gpu is Quadro FX 4500, i7, 6 GB of RAM.

    Thank you

    Hello

    Well, I'm glad that there's someone out there with the same problem as me. I was tearing my hair with this problem too on my system. There is nothing wrong with your specifications, it does the same thing on my system: core i7 2.8 ghz 12 GB Ram double quadro 3800 s 2 x 1 TB sata 7200 rpm 1 x 60 GB SSD windows 7 64

    I thought it was strange because the playback head going back and also the windows media and quicktime, vlc etc player had no problem playing all the files I've tried editing with inside the first.  the same thing happens in CS4 and CS5. (and with the Mercury engine gpu acceleration of the reduction on or off)

    I spent reinstalling the codecs that I thought the problem, but the problem is caused by the Realtek HD audio driver. If you disable the realtek audio you can edit perfectly. I tried the latest driver of course but its still the same.

    I think to buy an audio interface and do not use the integrated audio system that I read somewhere in my research on this problem which onboard audio causes all sorts of problems.

    I might try some older drivers Realtek first well...

    Please report if you find the drivers work capable of solving this problem.

  • Problem in the use of data dashboard

    Hello

    I wanted to start with data dashboard application, I installed the app on my phone Android mobile phone.

    I followed the document started with the http://www.ni.com/white-paper/13757/en/ dashboard data

    the screen illustrated in this document comes when I start the application in my laptop.

    The first screen

    The second screen after add touch

    The last screen that gives an error

    Waiting for response.

    Concerning

    resolved after seeing www.youtube.com/watch?v=FCujba8euWc

    Thank you all

  • problem with the clock and date

    I need to change the time and date when I started windows. so, what's the problem?

    It could be the button for the CMOS battery.

    A low CMOS battery can sometimes various issues, including slow, locking unexplained performance issues as well as others.

    It is quite rare, but the battery is relatively easy to replace, check the manual of your computer/motherboard for replacement details.

    Generally, the battery is a watch battery "CR2032", about the size of a nickel.

    `~`

    The current time and the date now in Baja California, Mexico

    07:36
    Friday, may 3, 2013
    DST - 0700 UTC
     
    UTC/GMT is 14:36 Friday, may 3, 2013
                
    Current weather conditions in San Felipe

    Sunny29 ° C / 85 ° F
  • Problem with the fusion of data using the Avery label template

    I use indesign for a mailing of basis for my Christmas card labels. Each year, it worked perfectly...

    This year, for some reason any, when making a data merge (and asking an overview with multiple records) in an blank document , it works fine.

    As soon as I try in the model of the preview disappears and it shows just the first record.

    I tried and then export the model as image and placed just behind and even on its own layer... In the hope to use only the model as a visual guide... but the preview does not work either.

    Basically, I can't get anything in the document to make it work. But then I have no assurance as to the separation so he can hit the labels/page 30 on point.

    Has anyone else had these issues?

    When you perform multiple records per page preview is bug. Either don't use the preview, or cancel immediately after, then perform the merge.

    If you have already used a snippet in your template, it is no longer needed and should be replaced. You can copy your placeholders in a new template file. I'm not familiar with Avery templates, but I suspect that they are not intended to be used with a multiple records by merging the page. Several mergers Records exactly require a set of placeholders in the upper left corner, and the other instances will be duplicated according to the margin and spacing parameters that specify you in the merge options. Thing that guides guides on your page is likely to cause a problem.

  • The problem in the first debug event

    01.jpg

    I can't open the first in all. Having installed and uninstalled. Always displays this message. What should I do? never had such a problem with first. Now I'm getting worried because my creations do not open.

    I managed to solve the problem. I was in the folder C:------users-Documents-Adobe-Premiere Pro------8.0------profile found the file that u had quoted to the effect presets. Deleted and tried to open my project. DEU RIGHT!

  • Problem with the first pro effects controls

    Hi, Merry Christmas;

    I have a problem with the keys with the opacity effect in the effect controls panel. the following pictures I think make my problem more clear to understand:

    view of raft opacity control.png

    The picture above shows that the opacity of the element of gopro correction control is 100% unless I drank too much champagne, or fully visible on the screen!

    I want to do a transition effect showing the raft, which appear in the window of the following image, which is an Indian granary above the Colorado River.

    My video of the attic I zoomed up to the window they give the impression that enter the attic when I arrive at the moment I start, with keyframes to have

    inside of the attic without an opacity of 100% to 0% at the end of the clip attic. Unless the new champagne is very bad for my health and vision, I would then see the river

    and the raft! Well I did not and it gives me nightmares! What is the problem? I add that having a zoom smooth and regular, I used the effect time remapping in the video for attic.

    The clip of attic is just above the clip from gopro correction and he overlapped by the duration of the selected dissolution of the shown in the image below (I could of course use a resolution here, but I want to save money on an additional effect)

    view of granary opacity controls.png

    Here is the view with the screen and the opacity of the element of attic at 25%. Normally, the clip of the raft must be visible then! the orange-red to the right of the screen is inside wall of the attic!


    view with screen at 25pct opacity.png

    Thanks for your suggestions... Claude

    Sorry guys, I found the reason. My fade is too short! I had put 2 "to fade and seems not sufficient due to the element of the upper layer time remapping effect! Sorry for the inconvenience.

    Claude

  • Problem with the locale and date serialization in java

    Hello
    I have a serious problem with Flex dates and need a solution as soon as possible. I have a Flex 2 front end that uses remote java objects to talk to the database. I have a Flex 2 DateFields form. The dates of these are stored in the datebase. However I need the dates to be stored exactly as users them selects regardless of the locale.

    What is happening at the moment is we are developing in Ireland and in selecting a date, filling an actionscript VO which is in turn transformed into a java VO (on a server in the United States) and when the date is stored in the database is one day before the date that we have selected. It seems that the flash player uses the locale with a time of midnight (GMT) users. When place the conversion to the EAST, it stores the date (GMT - 5), which causes the being Eve.

    I changed my flex code to set the date at 12: 00 time even if he converts and subtracts 5 hours it will always be the same date. But this does not work, it seems to work sometimes and not others and is very inconsistent. I can't understand why it works sometimes.

    Its makes me mental - someone has experienced this problem or did someone knows a solution PLEASE?
    Thank you

    I'm not very familiar with your specific question, but I wonder if a combination of store dates as the first milliseconds since midnight January 1, 1970, universal time, stored as a string and then when presenting the data are aware, locale would solve the problem.

  • Problem with the type of data in a view

    Hi all

    I have modified a view. For this reason my view passed to varchar2 column data type number automatically. But it should be only a number.

    Updated the view that changes the data type of column varchar2

    VIEW to CREATE or REPLACE v1
    AS
    SELECT Decode (Sign (mta.base_transaction_value), 0, Decode (Sign (mta.transaction_value), Decode (Sign (mta.primary_quantity),-1, NULL, 0))
    MTA.base_transaction_value),
    -1, NULL,
    Decode (Sign (mta.primary_quantity),-1, NULL, NULL
    MTA.base_transaction_value),
    (0)
    1, MTA.base_transaction_value,
    Col1 is NULL)
    Mtl_transaction_accounts MTA

    Old view that keeps this column under the number:

    VIEW to CREATE or REPLACE v1
    AS
    SELECT Decode (Decode (Sign (mta.base_transaction_value), 0, Decode (Sign (mta.transaction_value), 0, Decode (Sign (mta.primary_quantity), 1,0,))))
    0,0,
    (NULL),
    1.0,
    (NULL),
    1, MTA.base_transaction_value,
    Col1 NULL))
    Mtl_transaction_accounts MTA

    -> Create a note that the type of data of base_transaction_value, transaction_value, primary_quantity columns is number

    No help for making the data type of column 'col1' number using my first query?

    Thank you
    Srini

    The data type of an expression of DECODE() is determined by that of his first return value. Oracle has decided that a NULL value is a VARCHAR2 data type (because there must be something ).

    The changes to your code are extremely intertwined and twisted out and frankly too hard to work through. However, I think at some point the changes that you have implemented it had that effect.

    SQL> create or replace view v1
      2  as
      3  select decode(to_number(to_char(sysdate, 'dd')), 1, 0, 99) as col1
      4  from dual
      5  /
    
    View created.
    
    SQL> desc v1
     Name                                                  Null?    Type
     ----------------------------------------------------- -------- ----------------
     COL1                                                           NUMBER
    
    SQL> create or replace view v1
      2  as
      3  select decode(to_number(to_char(sysdate, 'dd')), 1, null, 99) as col1
      4  from dual
      5  /
    
    View created.
    
    SQL> desc v1
     Name                                                  Null?    Type
     ----------------------------------------------------- -------- ----------------
     COL1                                                           VARCHAR2(2)
    
    SQL>
    

    Cheers, APC

    blog: http://radiofreetooting.blogspot.com

Maybe you are looking for

  • App sketches and system fonts

    When I try to open a new document from a model and specify iOS 9 UI, Sketch gives me the following warning: "some fonts in this Document are missing." " The following fonts are used, but it is not found on your system." It then lists a number of SFUI

  • Gravity is HARD on my Tecra M1 disk problem?

    I have a Tecra M1, 1.6 GHz, MS Windows Xp sp2.Last week, I posted a message to describe the problem of my computer. He started very slowly every time I restarted the computer. I logged on and there were Windows to notice that my system has problems.

  • May not increase the value of data chart history but may decrease

    Hello In my application, I use 3 cards. I have 250 Hz sampling frequency on my system and I want to display a different number of seconds on my paintings. By default, the chart history data have 1024 points, which is second ~4.1. Now the problem is,

  • Limitations of hard drive?

    I just got off the coast of cat and was told that a 500GB hard drive would not work in my laptop, HP Pavilion dv9607us PC notebook. The basis of this info was a pdf file that showed that the largest drive available at HP is a 250 GB. Is it possible t

  • Upgradeing GPU NVIDIA 980 m

    Hey guys, I have an Alienware with two GPUS of 770 18 m in sli. I've been asking may well be the new nvidia 980 m gpu Sli d together and if yes, are they compatible with my system. Congratulations in advance with all your guys help.