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: saustin
  • Order by date
  1. saustin

    Help NEW but desparate how to rebuild corrupt index

    Many thanks for the super advice. Back up and running again. Cheers, Steve.
  2. saustin

    Help NEW but desparate how to rebuild corrupt index

    Hi, Have a foxpro back end and an error message that the index needs to be rebuilt. Have the dbf how do you rebuild the index in foxpro 6.0. Apologies in advance for lack of foxpro wisdom. thanks !!!!
  3. saustin

    Date validation oops!

    Have a user who entered '8/1007' into a text field that when converted to a date resulted in the year 2007. Not good ! Any other date validation tricks out there that might be preferable ? Thanks. SQL> select TO_CHAR(TO_DATE('8/1007', 'MM-DD-RRRR') ,'YYYY') from dual; TO_C ---- 2007 SQL>
  4. saustin

    How to assign results of an EXEC to a variable ?

    Hi Flashmerlot, Many thanks for your reply. Have done some research on this question and the trick is to use sp_executesql instead of exec. Here is the example.... declare @anumber money declare @anumber1 money set @query = 'SELECT * FROM OPENQUERY(VMFG, ''SELECT...
  5. saustin

    How to assign results of an EXEC to a variable ?

    Hi, Have a query which works perfectly and now need to assign it to a variable. How do you do that ? Am getting errors, is it not allowed with openquery ? For example I need to store the results of the exec below to a variable. Thanks, Steve Declare @query varchar(8000) Declare @pID...
  6. saustin

    Genius trigger thoughts needed, Mufasa ?

    Hi Mufasa and BJCooperIT, Many thanks for your support and inspiration. Turns out that after much debugging that the trigger was failing due to a left outer join [2thumbsup]. Amazing how this can prevent a record from saving but the moral of the story is you learn...
  7. saustin

    Genius trigger thoughts needed, Mufasa ?

    Precisely what I'm looking at now. Was trying to do anything to avoid this however.
  8. saustin

    Genius trigger thoughts needed, Mufasa ?

    Not at all, am saying that my attempt to copy off values from the SHIPPER_LINE table (and associated tables) can in rare cases prevent a SHIPPER_LINE record from being saved. Specifically the join on the SHIPPER table due to other triggers on the SHIPPER_LINE table. Am looking to copy off...
  9. saustin

    Genius trigger thoughts needed, Mufasa ?

    That is exactly what i want to do ! Let me provide further details.... TBLSDSHIPMENTS is the second table we want to populate with data from several tables with the when a new record is inserted in SHIPPER_LINE. This is the original trigger. DECLARE mSHIPPED_DATE...
  10. saustin

    Genius trigger thoughts needed, Mufasa ?

    Hi, Want to save data to a table (TBLSDSHIPMENTS) after a new record is saved in table (SHIPPER_LINE). Because of other triggers and restrictions on this table am not able to save all the data i need to a table with an after insert trigger. Can save of some (but not all) of the critical...
  11. saustin

    TRIGGER - HOW TO CLEAR ?

    Rollback will trouble the enduser with an error message they need to clear. In the meantime have found a way around this by copying values to another temp table with no triggers on it. Many thanks, Steve.
  12. saustin

    TRIGGER - HOW TO CLEAR ?

    Want none of the commands (lines) to effect the table if that condition is not met. For some reason now even though the code above seems straight forward another trigger on the table has a problem with my code and will not save a record in the table even though this is an after insert trigger...
  13. saustin

    TRIGGER - HOW TO CLEAR ?

    Thanks for the reply. Took the commit out but have the same result. Requirement is to save data from this and other table in another table if the following conditions are met .... ..... IF mCUSTOMER_ID='97' AND mUSER_SHIPPED_QTY >0 Again, how do you CLEAR the trigger commands if this...
  14. saustin

    TRIGGER - HOW TO CLEAR ?

    Hi, Have an AFTER INSERT trigger below which populates another table ONLY if a condition is met. Want to CLEAR the prior trigger commands if that condition is NOT met. What is the best way to do this ? Other triggers on the table are not saving a record in (this table) due to my trigger...
  15. saustin

    UPDATE OPENQUERY mulitiple tables ?!?

    Hi, Have no problem running the openquery code below. Declare @query varchar(8000) Declare @pID varchar(20) Declare @pLINE varchar(5) Declare @oDESIREDRCVDATE varchar(10) Declare @pSTATUSX varchar(1) Declare @pSTATUSC varchar(1) Set @pID='NYDELLTEST' Set @pLINE='1' Set...
  16. saustin

    Sql Server Update from Oracle 9i preference ?

    Hi, Have set up a nice database link to a sql server box from an Oracle 9i server. My mission is to populate a sql server table with an record from an oracle table after an insert. Is the best way to do this just a insert trigger or is there a better way ? Only expect about 100 records a day...
  17. saustin

    Date validation in trigger

    SOLVED, fyi this handles 2yr and 4yr date checking (this century only)in a text field. DECLARE bad_year EXCEPTION; BEGIN IF :NEWDATA.USER_1 > ' ' Then if TO_CHAR(TO_DATE(:NEWDATA.USER_1, 'MM-DD-RRRR') ,'YYYY') > '2100' OR TO_CHAR(TO_DATE(:NEWDATA.USER_1, 'MM-DD-RRRR') ,'YYYY') < '2000' then...
  18. saustin

    Date validation in trigger

    No problemo Dave, Don't even get me started on the "long raw" field types the vendor fell in love with. Best regards, Steve.
  19. saustin

    Date validation in trigger

    Hi All, Carp many thanks for the moral support. Will just add a date range check to the code. Right now it will reject text but you could put in 1/1/907 with no error. Steve.
  20. saustin

    Date validation in trigger

    Hi Dave, Why naturally because it is a 3rd party legacy app we support and have no choice over for the next year.

Part and Inventory Search

Back
Top