Removing even more code from the first statement and it still procudes the result of 159.
SELECT RECIPE_ITEMS.Item_ID as 'ItemID',
SUM(PSData.quantity) as 'Qty'
FROM PSData
INNER JOIN STORE_RECIPE_PLUs ON PSData.plu = STORE_RECIPE_PLUs.PLU
INNER JOIN STORE_RECIPES ON...
I have been working with two SQL statements for the last little bit and am unable to determine why they are not matching.
These statments were created with SQL servers query analyzer before being placed into production code.
SELECT ITEMS.Item_Name as 'ItemName', ITEMS.Item_ID as 'ItemID'...
...(default .t.) and an autoincrementing field nid. The table has a validation rule of setsend() in a db stored procedure.
FUNCTION setsend()
* Don't do it if lSend is getting replaced
IF TYPE("lsend") = "L"
IF CURVAL("lSend") = lsend
replace lSend WITH .T.
ENDIF...
Is their a way to determine between an insert statment and a replace statment in a table validation rule? Using VFP8 SP1!
EG:
IF INSERT STATEMENT
* do nothing
else
* do something
endif
Thx for your reply!
Thanks for your replies. I have just about given up on this problem. If i use an append blank followed by a replace statement everything works correctly and i am not noticing a performance difference.
It just irks me that i cant figure out why this datatype mismatch error is occuring.
The table that i am trying to insert to has an autoincrement field. When data buffering is enabled i am getting a data type mismatch error on the insert statement.
I was hoping i could somehow retrieve the current value of the autoincrement field and then use that value in my insert statement...
I am having problems with autoincrementing fields and data buffering in VFP8 SP1. I am getting a data type mismatch error when inserting into a buffered table.
I found a tidbit of information in the vfp 8 help file but unfortunatly do not know how to use it. I want to know how to get the...
If the auto increment field is removed the insert statement works correctly.
Does anybody see a solution to this or a way around it as im 100% sure its related to data buffering.
Hey guys im back with a couple of questions. I will use table test for demonstration. This table has had a logical field "lsend" and an auto increment field "nid" added to it.
ALTER TABLE test ADD COLUMN nid i
replace ALL nid WITH RECNO()
CALCULATE MAX(nid) TO lnMax
lcMax = TRANSFORM(lnMax)...
Thanks mike. The reason i had added the recno() is that when adding an auto increment field to a table that allready has records the field is populated with zero's. To get around this i added the default of recno() which populates correctly. So i have had several suggestions to remove the recno...
Hi Craig.
The following code works great except on buffered tables. Sometimes the curval is returning null when inserting into a buffered table.
An append blank works correctly however.
What would you suggest in getting around this issue?
Cursorsetprop("buffering",5,alias())
FUNCTION...
I am convinced that this has something to do with table buffering? If i disable table buffering the insert statement works correctly. With buffering turned on everything except the auto increment field is inserted?
Anybody see a cause / solution to this?
Thank you
I have added an auto incrementing field (nid) to several tables.
ALTER TABLE dispdetail ADD COLUMN nid i AUTOINC NEXTVALUE RECCOUNT() +1 DEFAULT RECNO()
When inserting into this table now i am getting data type mismatch error. All fields are correct in the insert sql statement however when...
We are having trouble with one of our applications. There is a timer that fires the refresh of a form. It fires every 10 seconds.
Maybe once every other day error number 13 occurs ( "Alias is not found" ) The error only occurs on one of the tables?
Does anybody know of any rhyme of reason as...
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.