If the values of the alpha characters are A-I and "{", then you may be losing data -- it could be that the data was previously stored as numeric in zoned decimal/packed format. Let me know if you need to know how to convert the alpha characters to back to ascii numeric.
~Marsh
A quick & dirty way to list longname vs short name of tables in .dbc -- assumes < 100 tables in dbc -- if yours is bigger, increase the array size:
close all
clear all
clear
dimension tbname(100)
? "starting..."
use DataBaseName.dbc
X=1
scan
if upper(allt(objecttype))="TABLE"...
Back in the day, when long file names were first coming into use, VFP had a neat way of dealing with it -- the .dbf would be 8.3 compliant, but as long as it was in a database container, you could give it a more appropriate name. so the file would be scontrol.dbf, but inside the database (let's...
Try:
select someone, sum(pcf_amt_due) as TotalOrigDue, sum(pcf_amt_pd) as TotalPaid, sum(pcf_amt_due) - sum(pcf_amt_pd) as TotalDue
from TheTable group
by someone
having (sum(pcf_amt_due) - sum(pcf_amt_pd)) > 0
Try:
select case when DATEPART(Month,'Jan 10 2003') > 9 then str(DATEPART(Month,'Jan 10 2003'),2) else '0' + str(DATEPART(Month,'Jan 10 2003'),1) end
Change Jan to Dec -- should still work
I think it's because of your where clause -- once it is applied, the null results disappear. You might try something like this:
SELECT i.InvtID, i.SiteID, i.QtyAvail,
s.InvtID as InvtID2, s.SiteID as SiteID2, s.InvcDate
FROM Inventory i FULL OUTER JOIN Sales s ON...
Try:
sele a.sup_no, c..ord_qty as ord_qty, b.po_no,b.ord_unit,' ' as Gstatus
from grn_hdr a join grn_dtal b
join po_dtal c
on c.po_no=b.po_no and c.invent_no=b.invent_no
on a.grn_no=b.grn_no
VFP is not fund of derived queries.....
select
ClientNumber
, convert(varchar(10), DateCalled ,120) as DateCalled
, count(*) as TimesCalled
from tablename
where convert(varchar(10),DateCalled,112) =
convert(varchar(10),dtDateToFind,112)
group by ClientNumber, convert(varchar(10), DateCalled ,120)
order by ClientNumber...
Travis,
Oops, no wonder you thought I was too convolutted, I accidentally put the same step in twice (the month-add 0 -- already at first of month....). Here's a shortened method, with explanations:
select account_date ,
DateAdd("d", -1, DateAdd("m", 1, account_date -...
"bloc" is short for blocksize, as in "set blocksize to some number", used to control memo field disk space. See the commands "sys(2012)" and "set blocksize" in help.
To see the use "bloc" as a key/reserved word, from the command window...
If the date string is always 8 characters/numbers, in CCYYMMDD format and you are using vfp 6.0 or greater:
tmpFormat = transform(20021231, "@R ####,##,##")
newDate = date(&tmpFormat)
Note that
tmpFormat = transform(20021231, "@R 9999,99,99")
also works
Also, instead of...
That's dangerous -- it assumes that you really know what the currently selected work area is. If other data gets added to form, you might get unexpected reults.
Just also dawned on me what's really happening. Remove the code from the click button that is trying to close the cursor -- your...
The help file says:
"You have attempted to select a table outside the 32K work area range or are attempting to reference a file variable in a table that is not open."
Can you post your exact query used to create the cursor, and the code your are using to close/release it?
Have you...
In the subclassed method--
If you want the inherited code to run first:
DoDefault()
Your code here
If you want your code first, then the inherited behavior:
Your code here
DoDefault()
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.