Define the retrieval argument as type string array. Store the relevant values in an array and pass that array as the retrieval argument.
a_list[1] = 'a'
a_list[1] = 'b'
a_list[1] = 'c'
dw.Retrieve(a_list[])
RT
Assuming only 4 levels and say u need to retrieve it for companyid = 10, this single query (union of 4 queries) should give you the desired output
-- 1st level
select a.question + ','+b.answer+', , , , , , ,'
from #tbl_Question a, #tbl_Answer b
where b.Company_ID = 10
and a.Questin_ID =...
Try these. I have some doubts whether I have understood your requirements for top exit pages.
1. top 1 * from each group
select a.*
from your_table a ,
(select SessionID , max(Timestamp) as last_tm
from your_table
group by SessionID) t1
where a.SessionID = t1.SessionID
and a.Timestamp =...
Hi Terry,
Yes, I did think about that also. There were some issues with that
1. It has to be at the server level. So even queries which may genuinely need extra time will get affected (there are some as part of application design).
2. This can be taken care of by setting the cost limit in the...
Hi SQLSister,
I fully agree with you that no one except developers/DBA should have such rights but the problem is our users. We are an IT training group and these users teach IT subjects (SQL included) and obviously they think no end of their capabilities. Most of the times they are right but...
I tried the sp_executesql. It works the same way as execute. Also, sp_setapprole cannot be invoked within a stored procedure. It has to be invoked directly from T-SQL. Any more ideas? RT
I think I have not explained the issue properly. We are not trying to hide any data - only trying to ensure that users do not fire queries which will not choke up the processor.
There are some tables which contain millions of records. To begin with, we want to make sure that someone does not...
Hi folks,
I wanted to implement a policy at our workplace where users cannot submit a select query directly but should execute a procedure with the query text as parameter and the procedure in turn will execute the query. The users should be denied all rights except to execute this procedure...
Yes, it is quite simple. There is a DBError event in the datawindow control. Just display your error message in this event and set return code to 1 so that it suppresses the system message
MessageBox("Your Error","Your error text")
return 1
RT
Any normal column object will let you do this. In the edit property tab for the object, make sure you have checked the vertical scroll properties as on (Auto Vert Scroll and Vert Scroll Bar). Also make the column object height and width as you would like it in your display and disable horizontal...
You can use the modify method to change the select statement of the datawindow at run time as follows
1. Design your datawindow with any table so that the columns of the datawindow are named as column_x, column_y and column_z.
2. During run time, you decide that the query should run from say...
My guess is that the problem is in the join
and t.user_updated = s.sys_user_nt_id
Have you checked out whether the select statement in the trigger returns any rows. Where is t.user_updated getting populated (It is not part of the insert statement which is firing the trigger)?
RT
There are two options to do this.
1. Login as the anonymous user and then use the sp_helptext to get the code of the view.
2. The other method is to dig into the system tables as follows
select id from sysobjects where name = <your view name>
Once you have this id
select text from...
create trigger some_trigger on tablea for insert as
insert into tableb
select * from inserted
where not exists
(select accno from tableb join inserted on
tableb.accno = inserted.accno)
RT
It is a good practice to keep proper version control of your source code but if for some reason you have lost it, there is code available on the web to decrypt the procedures as I got to know recently. See this thread
thread183-419034
RT
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.