SQL query help

Discussion in 'Software' started by Publius, Feb 11, 2006.

  1. Publius

    Publius Sergeant

    I know it is hard to give help on queries when you aren't familiar with the DB structure, but I will try to explain as well as I can.

    This db drives and is populated by a web based lab tracking system that I am working on. The first query give the days transfers from a source "container" to a destination "container" when the use performs the 'Create Drug Dilution Plates' in the lab. The second query the days transfers from a source "container" to a destination "container" when the use performs the 'Drug Cells' step in the lab. The comonality between the two steps is that the ch.containerId in the first query is the same as the ch.sourceContainerId in the second step.

    In the database, tables are typically joined by their unique e.eventId which is a unique key assigned to any action performed in the lab. However, I am looking for a way to join these two queries essentially by the commonality described above. The two actions have different eventId's because they happened at different times, so that is of no use. Can anyone see a way to join these two queries to give me the association from the first ch.sourceContainerId to the ch.containerId in the second query?

    SQL isn't my strongpoint, so any help is appreciated.

    Thanks,
    Publius
     
  2. IAmLerxt

    IAmLerxt Private E-2

    I don't have an answer for you as sql is not my strong point either, however I can point you to a site that has NEVER let me down for SQL questions. Go to http://www.sqlteam.com and post in the forum there. There are some really strong sql gurus over there that can more than likely help you out.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds