Atrix, One more thought I have is I am assuming you are talking about a direct DBMS command. I recall sometimes having wrapping problems on the direct DBMS command. Just something to keep in mind. Sometimes it seems to have a hard time figuring out where the command is supposed to end and if you put the whole thing on one line seems to take care of the problem. It just makes it really hard to read.
Troy -----Original Message----- From: Troy Sosamon [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 4:01 PM To: [EMAIL PROTECTED] Subject: RE: [RBASE-L] - R:Tango Atrix, You should be able to do this. I think you will have better luck w/ the other form of the <@if> function like this: <@if expr="@@user$LocDD=1", true="locno, location"> Tango will replace all of the tags before Oterro gets the query. Try it and see. If you have problems, turn on debug and you should be able to get it to work. Troy -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Atrix Wolfe Sent: Thursday, June 05, 2003 11:56 AM To: RBASE-L Mailing List Subject: [RBASE-L] - R:Tango hello again, i was wondering if there was any problem with using metatags in DBMS that are passed to Oterro. I know Witango handles the meta tags but if i have a DBMS which looks like: sel pono, prnumber, username, trandts, tranid, vendorno, reqno <@if expr="@@user$LocDD=1">, locno, location </@if> from tranmaster t1, userno t2, tranacctid t3 <@if expr="@@user$LocDD=1">, location t4 </@if> where t1.submittedby=t2.userno and t1.tranid=t3.tranid <@if expr="@@user$LocDD=1"> and t4.districtno='@@user$vdistrictno' and t1.locno=t4.locno </@if> and t1.districtno='@@user$vdistrictno' @@local$Clause <@if expr="<@arg searchlocno>=''"> <@if expr="@@local$purchaser!=@@user$gvuserno and @@user$LocDD!=1"> and (t1.locno='@@user$gvlocno' or t3.acctid in (sel acctid from accounts where districtno='@@user$vdistrictno' and budyear='@@user$vbudyear' and sget(accountno,@@user$locationlen,@@user$locationstart)='@@user$gvlocno')) <@else> and ((t1.locno in (@@user$getlocsclause)) or (t3.acctid in(sel acctid @@user$AcctClause))) </@if> </@If> <@comment> and count > <@calc expr="(@@local$Page-1)*30"> and count <= <@calc expr="(@@local$Page)*30"> </@comment> order by <@if expr="'<@arg sortby>'='' or '<@arg sortby>'='Vendor'">trandts<@else><@arg sortby></@if><@ifempty expr="<@arg direction>"> desc<@else> <@arg direction></@if> that can come out as: sel pono, prnumber, username, trandts, tranid, vendorno, reqno , locno, location from tranmaster t1, userno t2, tranacctid t3 , location t4 where t1.submittedby=t2.userno and t1.tranid=t3.tranid and t4.districtno='64469' and t1.locno=t4.locno and t1.districtno='64469' and trantype in('ppo','opo') and orderstate=1 and trandts>'05/22/2003' and ((t1.locno in (sel locno from location where districtno=sget('64469',5,1) and location.locno in (sel distinct sget(accountno,7,31) from accounts where accounts.districtno='64469' and accounts.budyear='02-03' or (acctid=54868 or sget(accountno,1,26)='9')))) or (t3.acctid in(sel acctid from accounts where accounts.districtno='64469' and accounts.budyear='02-03' or (acctid=54868 or sget(accountno,1,26)='9')))) order by trandts desc does Oterro have any problem with taking an sql statement formed as above or are there any inherent problems with using <@if> and other metatags in a DBMS like this? Thanks! Atrix

