GetPrices=: 4 : 0
sqlcmd =. ' SELECT cl_lname, cl_title, '
sqlcmd =. sqlcmd,'pp_year, pp_id, pr_mfd, pr_price'
sqlcmd =. sqlcmd,' FROM (price_profiles INNER JOIN'
sqlcmd =. sqlcmd,' prices ON pp_id = pr_pp) INNER JOIN'
sqlcmd =. sqlcmd,'(clients INNER JOIN revs ON cl_id = '
sqlcmd =. sqlcmd,'rv_client) ON pp_id = rv_pp'
sqlcmd =. sqlcmd,' WHERE cl_id=? AND rv_validuntil Is Null'
sqlcmd =. sqlcmd,' ORDER BY cl_lname, pr_mfd;'
profiles=. > _3 {."1 }. y query__db sqlcmd
'pp mfd prc'=: |: data
profiles=. ((_1}.pp~:1|.pp),1) <;.2 profiles
)

2007/2/13, Sherlock, Ric <[EMAIL PROTECTED]>:

I want to define a local multiline noun within a verb. If I put the ')'
for the noun in the first position the verb definition terminates. If I
indent the noun definition lines with a tab, the verb seems to define OK
but when I run it J becomes unresponsive. That is I can still interact
with J (access menus & type stuff), but the menu commands and (including
exit) and sentences don't seem to execute.
Is this possible or is there another solution?


GetPrices=: 4 : 0
sqlcmd =. 0 : 0
SELECT cl_lname, cl_title, pp_year, pp_id, pr_mfd, pr_price
FROM (price_profiles INNER JOIN prices ON pp_id = pr_pp) INNER JOIN
(clients INNER JOIN revs ON cl_id = rv_client) ON pp_id = rv_pp
WHERE cl_id=? AND rv_validuntil Is Null
ORDER BY cl_lname, pr_mfd;
)
profiles=. > _3 {."1 }. y query__db sqlcmd NB. get last three columns of
query
'pp mfd prc'=: |: data NB. assign each column to name
profiles=. ((_1}.pp~:1|.pp),1) <;.2 profiles NB. box profiles by client
)

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm




--
Björn Helgason, Verkfræðingur
Fugl&Fiskur ehf, Þerneyjarsund 23, Box 127
801 Grímsnes ,t-póst: [EMAIL PROTECTED]
Skype: gosiminn, gsm: +3546985532
Landslags og skrúðgarðagerð, gröfuþjónusta
http://groups.google.com/group/J-Programming


Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans

góður kennari getur stigið á tær án þess að glansinn fari af skónum
         /|_      .-----------------------------------.
        ,'  .\  /  | Með léttri lund verður        |
    ,--'    _,'   | Dagurinn í dag                     |
   /       /       | Enn betri en gærdagurinn  |
  (   -.  |        `-----------------------------------'
  |     ) |        (\_ _/)
 (`-.  '--.)       (='.'=)
  `. )----'        (")_(")
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to