Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: marsh
  • Order by date
  1. marsh

    FoxPro

    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
  2. marsh

    Truncating VARCHAR text pulled down from query?

    Try left() select left(fieldname,15) from tablename
  3. marsh

    adding a blank line to a richtextbox

    Have you tried RTBox.RTF = string1.Trim() + "\n\r" + "\n\r" + string2.Trim(); where \n\r is the carriage return + line feed?
  4. marsh

    DBF file has two names

    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"...
  5. marsh

    DBF file has two names

    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...
  6. marsh

    Based on criteria don't show record

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

    Convert Month to Text ... Pad 0 if single digit

    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
  8. marsh

    SQL Query - values not equal for the same column

    Try: select style, count(region), max(price), min(price) from youtable group by style having max(price) <> min(price)
  9. marsh

    Full Outer Join with 2 tables doesn't 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...
  10. marsh

    Invalid Subquery

    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.....
  11. marsh

    Select Statement

    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...
  12. marsh

    how to find the last date in the month for a given date

    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(&quot;d&quot;, -1, DateAdd(&quot;m&quot;, 1, account_date -...
  13. marsh

    how to find the last date in the month for a given date

    Try: select account_date , DateAdd(&quot;d&quot;, -1, DateAdd(&quot;m&quot;, 0, DateAdd(&quot;m&quot;, 1, account_date - (Day(account_date ) - 1)))) from table_name Marsha
  14. marsh

    Grid on SQL Statement

    &quot;bloc&quot; is short for blocksize, as in &quot;set blocksize to some number&quot;, used to control memo field disk space. See the commands &quot;sys(2012)&quot; and &quot;set blocksize&quot; in help. To see the use &quot;bloc&quot; as a key/reserved word, from the command window...
  15. marsh

    composite key

    After creating the table, INDEX ON InvoiceNo + ProdNo TAG InvProdKey
  16. marsh

    Numeric to date conversion

    If the date string is always 8 characters/numbers, in CCYYMMDD format and you are using vfp 6.0 or greater: tmpFormat = transform(20021231, &quot;@R ####,##,##&quot;) newDate = date(&tmpFormat) Note that tmpFormat = transform(20021231, &quot;@R 9999,99,99&quot;) also works Also, instead of...
  17. marsh

    How to release a cursor created with an SQL statment?

    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...
  18. marsh

    How to release a cursor created with an SQL statment?

    The help file says: &quot;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.&quot; Can you post your exact query used to create the cursor, and the code your are using to close/release it? Have you...
  19. marsh

    Inherited Methods

    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()
  20. marsh

    How to release a cursor created with an SQL statment?

    Try: If used(&quot;tempCur&quot;) Use in TempCur Endif

Part and Inventory Search

Back
Top