Hi!
In the process of 'normalizing' my database created from DOS FP free tables, I am creating a table with the structure I want and then SELECTING-SQL to pull data into a temp table. I then use the table with the correct structure to append from the temp table. (because I didn't know how to send it to the new table with different structure.
The customer table is drawing data from two other tables. All goes well untill I append and get the error 'ship via does not accept null values'. Shipvia is pulled from a table by the select and is C(12) there and in the table I am appending to. Browsing the temp table shows data in some shipvia fields and NULL in some. How can I avoid the NULL.
Using VFP 6.0 which I am guessing would matter in doing this.
I have three fields added that did not exist before. Is there a way that I can use select to put empty fields in the temp table. Then I can do away with the append.[Smile]
Still need to get rid of the NULLs tho.
Any suggestions appreciated.
Judi
In the process of 'normalizing' my database created from DOS FP free tables, I am creating a table with the structure I want and then SELECTING-SQL to pull data into a temp table. I then use the table with the correct structure to append from the temp table. (because I didn't know how to send it to the new table with different structure.
![[blush] [blush] [blush]](/data/assets/smilies/blush.gif)
The customer table is drawing data from two other tables. All goes well untill I append and get the error 'ship via does not accept null values'. Shipvia is pulled from a table by the select and is C(12) there and in the table I am appending to. Browsing the temp table shows data in some shipvia fields and NULL in some. How can I avoid the NULL.
Using VFP 6.0 which I am guessing would matter in doing this.
Code:
SELECT DISTINCT Oldbill.*, Oldorder.shipvia,;
Oldorder.shipfob ;
FROM Oldbill LEFT OUTER JOIN Oldorder ;
ON Oldbill.custno = Oldorder.custno ;
GROUP BY Oldbill.custno ;
ORDER BY Oldbill.custno ;
INTO TABLE Custtemp
*** got temp table with customer info - append to table with new structure
USE (lcDirBase) + (lcTable)
APPEND FROM (lcDirOut) + "Custtemp"
I have three fields added that did not exist before. Is there a way that I can use select to put empty fields in the temp table. Then I can do away with the append.[Smile]
Still need to get rid of the NULLs tho.
Any suggestions appreciated.
Judi