Renegade
5th May 2015, 13:22
When executing below script, I get a fatal error - " Error 304 (General SQL Error) on select. I know mistake is in usage of ttaad200.crol(1); Can someone correct me please. Thanks,

select ttaad200.*
from ttaad200
where ttaad200.crol(1) <> "NO_ACCESS"
selectdo
endselect

bhushanchanda
5th May 2015, 14:00
Hi,

First I am assuming that you are running this in 000 company.

Second, you can also try using

select
ttaad200.*
from
ttaad200
where
ttaad200.crol(1) not like "NO_ACCESS"
and ttaad200._compnr = 0
selectdo
endselect

But, your syntax should work as well.

Also, try if this works-

select
ttaad200.*
from
ttaad200
where
ttaad200.crol(1) not like "NO_ACCESS"
and ttaad200._compnr = 0
as set with 100 rows
selectdo
endselect

bdittmar
5th May 2015, 14:00
When executing below script, I get a fatal error - " Error 304 (General SQL Error) on select. I know mistake is in usage of ttaad200.crol(1); Can someone correct me please. Thanks,

select ttaad200.*
from ttaad200
where ttaad200.crol(1) <> "NO_ACCESS"
selectdo
endselect

Hello,
just a hint.
TT Tables are in Company 000 !

Regards

Renegade
5th May 2015, 15:59
This worked:
f = switch.to.company(000)
select ttaad200.*
from ttaad200
where ttaad200.user = :tgbrg820.user
selectdo
if trim$(ttaad200.crol(1,1)) = "XYZ" then
flag2 = 0
else
flag2 = 1
endif
selectempty
flag2 = 0
ttaad200.crol(1,1) = ""
endselect
f = switch.to.company(900)

Renegade
5th May 2015, 16:55
This change worked - ttaad200.crol(1,1)

This change worked - ttaad200.crol(1,1):
f = switch.to.company(000)
select ttaad200.*
from ttaad200
where ttaad200.user = :tgbrg820.user
selectdo
if trim$(ttaad200.crol(1,1)) = "XYZ" then
flag2 = 0
else
flag2 = 1
endif
selectempty
flag2 = 0
ttaad200.crol(1,1) = ""
endselect
f = switch.to.company(900)

bhushanchanda
5th May 2015, 16:58
Hi,

That is weird? The following works at my end. May be something is different at your end.

select
ttaad200.*
from
ttaad200
where
ttaad200.crol(1) not like "NO_ACCESS"
and ttaad200._compnr = 0
selectdo
endselect