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 !!!!
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>
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...
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...
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...
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...
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...
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...
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.
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...
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...
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...
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...
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...
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.
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.