Hello list!

i was wondering, is it ok to use metatags within DBMS's?  Are there any known issues 
with doing that?  One thing i noticed is if i have a DBMS which looks like the 
following:

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>

it 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


Which i would assume would be valid SQL but am unsure.  Id rather have the <@if>'s 
inside the DBMS than breaking it apart into a small tree of if statements each with 
its own DBMS but if its a problem i guess i have no choice huh?

Anyone know if this is a problem?

Thanks!
Atrix
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

Reply via email to