DLOOKUP function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nandithadevaraj
    New Member
    • Feb 2008
    • 16

    DLOOKUP function

    Hi,

    I am working on oracle, frankly speaking till nw i have nt worked in oracle i need help

    please help me out in this


    actually i have written query using DLOOKUP function as DLOOKUP function is not supported in oracle how can i change that to other function. is there any function to convert????

    i wil include the dllokup function also

    DLookUp("[strStationHeadi ngName]","tblStationHe adings","[intStationHeadi ngId]=" & [tblGroundSuppor ts].[intStnHeadStart Id])

    PLZ HELP ME

    thanks in advance
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    In Oracle we write select statements to do the look up
    e.g
    [CODE=oracle]select strStationHeadi ngName from tblStationHeadi ngs where intStationHeadi ngId = <someValue>[/CODE]

    Comment

    • nandithadevaraj
      New Member
      • Feb 2008
      • 16

      #3
      Originally posted by r035198x
      In Oracle we write select statements to do the look up
      e.g
      [CODE=oracle]select strStationHeadi ngName from tblStationHeadi ngs where intStationHeadi ngId = <someValue>[/CODE]
      In need to use DLOOKUP function with in a select statement at that time how to do that ?? i tried by using sub query it returns single row but i need multiple rows

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by nandithadevaraj
        In need to use DLOOKUP function with in a select statement at that time how to do that ?? i tried by using sub query it returns single row but i need multiple rows
        Post a description of what you want the query to return including your table structure.

        Comment

        • debasisdas
          Recognized Expert Expert
          • Dec 2006
          • 8119

          #5
          You need to define your own function as per your requirment and use that later on.

          Comment

          • nandithadevaraj
            New Member
            • Feb 2008
            • 16

            #6
            Originally posted by r035198x
            Post a description of what you want the query to return including your table structure.

            SELECT tblShiftRecords .intRecordId, tblShiftRecords .intHeadingId, tblShiftRecords .AdvanceDate, tblShiftRecords .intShiftId, tblGroundSuppor ts.intSupGenera lType, tblGroundSuppor ts.intTypeId, DLookUp("[strSupportDescr iption]","tblGroundSup portTypes","[intGeneralSupId]=" & [intSupGeneralTy pe] & " and [intTypeId]=" & [tblGroundSuppor ts].[intTypeId]) AS SupDescription, tblGroundSuppor ts.intStnHeadSt artId, DLookUp("[strStationHeadi ngName]","tblStationHe adings","[intStationHeadi ngId]=" & [tblGroundSuppor ts].[intStnHeadStart Id]) AS StnHeadStart, tblGroundSuppor ts.sngStartStat ion, tblGroundSuppor ts.intStnHeadEn dId, DLookUp("[strStationHeadi ngName]","tblStationHe adings","[intStationHeadi ngId]=" & [tblGroundSuppor ts].[intStnHeadEndId]) AS StnHeadEnd, tblGroundSuppor ts.sngEndStatio n, tblGroundSuppor ts.sngDistLengt h, tblGroundSuppor ts.strSupportCo mments
            FROM tblShiftRecords LEFT JOIN (tblGroundSuppo rts LEFT JOIN tblGroundSuppor tTypes ON tblGroundSuppor ts.intSupGenera lType = tblGroundSuppor tTypes.intGener alSupId) ON tblShiftRecords .intRecordId = tblGroundSuppor ts.intRecordId
            GROUP BY tblShiftRecords .intRecordId, tblShiftRecords .intHeadingId, tblShiftRecords .AdvanceDate, tblShiftRecords .intShiftId, tblGroundSuppor ts.intSupGenera lType, tblGroundSuppor ts.intTypeId, DLookUp("[strSupportDescr iption]","tblGroundSup portTypes","[intGeneralSupId]=" & [intSupGeneralTy pe] & " and [intTypeId]=" & [tblGroundSuppor ts].[intTypeId]), tblGroundSuppor ts.intStnHeadSt artId, tblGroundSuppor ts.sngStartStat ion, tblGroundSuppor ts.intStnHeadEn dId, tblGroundSuppor ts.sngEndStatio n, tblGroundSuppor ts.sngDistLengt h, tblGroundSuppor ts.strSupportCo mments
            HAVING (((tblShiftReco rds.intHeadingI d)=[forms]![frmOneShiftWork]![cmbHeading]) AND ((tblShiftRecor ds.AdvanceDate) =[forms]![frmOneShiftWork]![txtDate]) AND ((tblShiftRecor ds.intShiftId)=[forms]![frmOneShiftWork]![cmbShift]) AND ((tblGroundSupp orts.intSupGene ralType)=1))
            ORDER BY tblGroundSuppor ts.intTypeId;

            Actually this is written by using Access but i need to be convert to PL/Sql

            How to do this???????/

            Comment

            Working...