Content-Disposition: inline Hello,
I have to find the key using value of a single column (not the whole row).
This is what I have:
q)select [10] from CUSTOMER
C_ID | C_TAX_ID C_ST_ID C_L_NAME C_F_NAME C_M_NAME C_GNDR..
----------| -----------------------------------------------------------------..
4300000001| “078GO5457DB627” ACTV “Fowle” “Joshua” W M ..
4300000002| “803MO6290MK444” ACTV “Swigert” “Willie” N M ..
4300000003| “329GW9315LX866” ACTV “Labree” “Amos” G M ..
4300000004| “047YK9898LQ614” ACTV “Ciciora” “Charlotte” C F ..
4300000005| “805QP9293HR611” ACTV “Criscuolo” “Franklin” F M ..
4300000006| “079CV0265WT109” ACTV “Rohrscheib” “Constance” A F ..
4300000007| “414RB8918PT543” ACTV “Burtchell” “Jason” V M ..
4300000008| “857CV4901DE721” ACTV “Kules” “Thomas” T M ..
4300000009| “834EZ4964IF367” ACTV “Moe” “Richard” A M ..
4300000010| “090EI5140VB829” ACTV “Proud” “Lydia” G F ..
q)meta CUSTOMER
c | t f a |
---|---|
C_ID | j |
C_TAX_ID | C |
C_ST_ID | s STATUS_TYPE |
C_L_NAME | C |
C_F_NAME | C |
C_M_NAME | s |
C_GNDR | s |
C_TIER | i |
C_DOB | s |
C_AD_ID | j ADDRESS |
C_CTRY_1 | s |
C_AREA_1 | s |
C_LOCAL_1 | s |
C_EXT_1 | s |
C_CTRY_2 | s |
C_AREA_2 | s |
C_LOCAL_2 | s |
C_EXT_2 | s |
C_CTRY_3 | s |
C_AREA_3 | s |
.. | |
I want to find the C_ID given the C_TAX_ID. |
q)cust_id: select C_ID from CUSTOMER where C_TAX_ID like “078GO5457DB627”
q)cust_id
C_ID
4300000001
Then I looked into the Tutorials and decided to use find operator since I want the key value from the data value
q)cust_id2: CUSTOMER?C\_TAX\_ID!("078GO5457DB627") 'type q)cust\_id2: CUSTOMER?(
C_TAX_ID!“078GO5457DB627”)
'type
a) What am I missing here? Further, does the find (or reverse lookup) need entire row for determining the key value?
b) Alternatively from the select result, how do I pick up just the value array (I do not want the header row)? [I am guessing I would be redirected to read the tutorial here. Well, I am digging around in parallel…but a clue would help:)!]
~Yuva