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: *

  1. RayPeck

    stored proc takes too long time for processing

    You have to find out what your stored procedure is doing before you can see what to fix. Even though its the "same" procedure as the other, it is obviously doing something different. That's why they're asking you to do: set showplan on go set statistics io on go exec proc_name go I...
  2. RayPeck

    how to generate insert statement from existing database

    It sounds like you want to create a copy of your sample database onto the client's machine. Another possibility is to just Dump the sample database (dump database to "path & filename"), then reload it on the client. If you have the same operating system as the client, that is the...
  3. RayPeck

    need more detail than sp_who

    Something I've also found helpful is this command: exec sp_showplan spid, null, null, null where you replace "spid" above with the number of the process id you see when you do an sp_who. This command will basically do an sp_showplan on the process that is running at that moment--so...
  4. RayPeck

    transaction log

    I'm not familiar with ASA (I use ASE) but it would probably be good to use "dump database database_name with truncate_only" before trying to use the "no_log" option. That can cause some corruption if a transaction were in progress when it was run. Also if you can se the...
  5. RayPeck

    Two opposite queries return the same data.

    Here's a possiblity (not knowing your limitations): SELECT SW_CASE.swCaseId FROM SW_CASE where SW_CASE.swCaseId NOT IN (select DS_SURVEY.swCaseId from DS_SURVEY where SW_CASE.swCaseId = DS_SURVEY.swCaseId) ray.peck@warnerbros.com
  6. RayPeck

    Dropping index in SYBASE ASE 12.0

    My guess is you're not logged in as "dba", which appears to be the owner of the table. Whereas you can specify the database and owner on the create index command, there does not appear to be that same ability on the drop index command. I don't know if this is helpful, but if the user...
  7. RayPeck

    Printing SQL database with statment

    I'm not familiar with SQL Anywhere as such, but assuming this is the same as Sybase's SQL, if you want to see all the data in a table, it would be: select * from tablename If you want to see what the table structure is it would be: exec sp_help tablename Hopefully, that's what you're asking!
  8. RayPeck

    Running an Excel Macro using OLE from PB

    I got the same error you did when trying to use the syntax that was recorded in Excel for running a macro. My assumption is you don't need the name of the worksheet in this case, since your ole1 refers to it when you opened it. The following syntax works when calling an Excel macro (called...
  9. RayPeck

    SQL stmt. for debug?

    To locate an error, I always put the following after each insert, update or delete: if @@error != 0 begin rollback tran select @msg = "xxx" raiserror 25xxx @msg return end If you are calling a stored procedure: exec @status = stored_proc_p if @status != 0 or @@error !=...

Part and Inventory Search

Back
Top