How do I create the select statements <below> into one stored procedure or batch file querying view tables>
/* In isql utility program, select statement work with view
and creating temporary table. */
1> select a.id, b.name, a.group_name, a.table_name, a.time
2> into c#list
3> from collect_list_v a, collection_v b
4> where a.id = b.id
1> select * from #clist
1> select grouplist.name from grouplist
2> where grouplist.name not like "[Kkdt]%"
3> and not exists
4> (select * from #clist
5> where #clist.group_name = grouplist.name)
It looks like the ASE is executing the stored and trying to resolve the tables and columns used within the stored procedure. Do you have any user defined types in the database your selecting from? If so are they in tempdb?
The next step is break down the stored procedure into chunks and see which bit its failing on.
create proc proc_name as
select a.id, b.name, a.group_name, a.table_name, a.time
from collect_list_v a, collection_v b
where a.id = b.id
It's just the first select without building the temporary table. If this works, try adding the temp table and so on. If the temp table doesn't work try creating a normal table. You'll need to enable select into/bulkcopy/pll sort to do this.