Deki Djokic wrote:
Deki, I was wondering is there anything that you are wanting the database to do that it doesn't? Any enhancements that you are looking to make.
Drew, thanks for asking:
1. How to insert function which suppose to calculate week number, according to given date number in frmInspection, txtWeek? I know how to do that with Access, but here...
Not completely sure how to answer this first part.

OOBasic does not have a function that returns the week of the year for a date variable.

HSQL has the built in function WEEK( <date> ) however, which returns the week of the year from 1 - 52. How you would call it depends on how you want to use it. For example do you really need to store this some place or can you simply calculate it from a date field. In you table "tInspection" you have a column "date", you can use the function in a select statement:

SELECT *, WEEK( "date" ) AS "week" FROM "tInspection"

You can use it update a field with:

UPDATE "tInspection" SET "week" = WEEK( '2005-12-28') WHERE "Id_No" = 0

You can also CALL in a SQL statement as in:

CALL WEEK( '2005-12-28' )

That all said, I suppose the real problem is how to use one of these from your form? Again, how do you really want to use it. Do you want to store the value, or just use it for display and filtering? Actually let me ask you this - how would you do it in MS Access - maybe we can find a similar approach in Base?
2. If I hit conclusion R or OWC, will be nice feature to record, additionally, Date, Inspection and Conclusion in separate table (eg, tFor_Confirmation). Later, to be removed if new (re-inspection) record is A, QAC, Noted, Witn,...
Not a problem - you will need to use a scripted macro for this ( unless someone can show me how to do it otherwise ). You would call this macro in the After Record Action event. The macro is not particularly difficult to envision, I am just curious how you will link the two ( or more records ). Looking at the data I see that the field "inspection" is not unique. Is there some combination of fields that will yeild a unique ( natural ) key?
I do not have idea how to do that.  Note one more thing: full table have 1200-2500 records, depends on size of the ship and shi*yard performance: can be time consuming....
I don't understand this question. Do you mean the database gets slow at 2500 records?

Drew

Reply via email to