Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: rt63
  • Order by date
  1. rt63

    Select In retrieval from datawindow

    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
  2. rt63

    Not possible Stored Procedure?

    Yes on any MS SQL version. (unless I am not understanding what you mean by SQL data). RT
  3. rt63

    Not possible Stored Procedure?

    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 =...
  4. rt63

    Complex grouping to analyze web stats

    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 =...
  5. rt63

    Parse long string list value

    Try this select convert(int,substring(data , charindex('#timeout=',data) + 9 , charindex('#',data,charindex('#timeout=',data)+1) - charindex('#timeout=',data) - 9)) as timeout , datediff(ss,lvisit,getdate()) as time_since_last_visit from #temp where charindex('#timeout=',data) > 0 This...
  6. rt63

    Hierarchy tree

    U can use treeview control or is it some other issue? RT
  7. rt63

    Select permission only through a procedure

    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...
  8. rt63

    Select permission only through a procedure

    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...
  9. rt63

    Select permission only through a procedure

    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
  10. rt63

    Select permission only through a procedure

    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...
  11. rt63

    Select permission only through a procedure

    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...
  12. rt63

    Playing with Datawindow error messages?

    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
  13. rt63

    Datawindow Column Object that supports text wrapping

    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...
  14. rt63

    Embedded SQL in Datawindow script

    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...
  15. rt63

    STRANGE - TRIGGER EXECUTION?

    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
  16. rt63

    Grabbing 'View' code

    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...
  17. rt63

    Grabbing 'View' code

    sp_helptext <view_name> RT
  18. rt63

    insert into table wiht unique index..

    It will work on record(s) being inserted and not the entire table. RT
  19. rt63

    insert into table wiht unique index..

    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
  20. rt63

    Store Procedure Encryption

    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

Part and Inventory Search

Back
Top