delphi

    Sponsored Links

    Next

  • 1. SQL and group by Year/Month
    Anders LEE wrote: > I have a table made up of a date & a quantity, how do I write in SQL > to get the sum for each month?? > > Select extract(Year from TrDate)*100 + Extract(Month from TrDate) as > YM, Sum(QTY) from MyTable group by YM > > Where Extract(...) is something I wanted like 200401, 200402 etc to > interpret the month in which the transaction occurs. > But it won't let me use it in groupby. > > Thank you in advance, > > P.S. I know I can do it with a two step approach, saving the temp > table with the YYYYMM field, then do the SUM(), but I guess there are > better way? Most SQL databases require you to use the actual column expression in a group by clause rather than the column alias. Select Extract(Year from TrDate)*100 + Extract(Month from TrDate) as YM, Sum(QTY) from MyTable group by Extract(Year from TrDate)*100 + Extract(Month from TrDate) John Leavey
  • 2. Updating Paradox MemoField
    I have scoured google, but don't really see a satisfactory answer: The following code produces a "type mismatch in expression" <snip> Q.Close; Q.SQL.Clear(); Q.SQL.Add('UPDATE "Invoice_Process.db" ' + 'SET Invoice_Worksheet = :ParamBlob '+ 'WHERE ("Bill #" = :BillNum)'); q.ParamByName('BillNum').AsInteger := BillNum; q.ParamByName('ParamBlob').asMemo := MyStringlist.text; Q.Prepare; Q.ExecSQL; </snip> Can anone show me how to update a Paradox memo field from a tQuery? My version of the BDE is 5.01. -dennis
  • 3. default values in a paradox database
    Hello, I'm trying to set a default value on a paradox table. I'm using DbiRestructure for that, but the problem I have is that I actually set a value, but not the one I'm expecting... The problem is that I don't know the format in which I have to set the default value buffer for strings, floats and so on. I can retrieve what was set in Database Desktop correctly, but when I try to set it... I got garbage. Thanks, pablo

Re: Re:

Postby Frank Marousek » Sat, 30 Dec 2006 01:04:33 GMT

I had no idea it was a common problem, but I'm certainly glad to hear that
it is.

May I bother you to instruct me as to how one goes about searching the
newsgroup archives?



Re:

Postby Bill Todd » Sat, 30 Dec 2006 01:24:52 GMT




Go to  http://www.**--****.com/ 

-- 
Bill Todd (TeamB)

Re:

Postby Rick Carter » Sat, 30 Dec 2006 01:48:07 GMT

This is a known problem, and has been discussed much in threads in this
forum, in borland.public.bde, and in other forums.  Search the newsgroup
archives for "insufficient disk space" or "4G limit" and you'll find
plenty.  There are also suggested work-arounds, and I think one is
a download available from Code Central.

Rick Carter
 XXXX@XXXXX.COM 
Chair, Delphi/Paradox SIG, Cincinnati PC Users Group

--- posted by geoForum on  http://www.**--****.com/ 

Re: Re:

Postby Frank Marousek » Sat, 30 Dec 2006 02:14:55 GMT

Thank you Bill and Rick.

I found this on "Rick's dBase page" (www.goldenstag.net/dbase/#Source)...
has anyone used this fix and care to comment?

BDE "Insufficient disk space" Error Fix
The BDE in all releases earlier than 5.2.0.2 (the version that ships with
dBASE Plus 2.5 and later) and later releases one assumes, has an error that
can occur if you or your users have free disk space on the hard drive that
is an exact increment of 4 gigabytes (i.e., 4, 8, 12, 16 ...). The file
BDE4GigFix.zip includes the .DLL file that solves this issue (it's a "patch"
for the BDE), and also a small program that will load it. Details are in the
file "BDEFix.prg" contained in the .zip file. Note that if you have dBASE
Plus 2.5 or later, this should not be an issue, and you do not need this
file.



Re: Re:

Postby Rick Carter » Sat, 30 Dec 2006 02:17:38 GMT

>May I bother you to instruct me as to how one goes about searching the

Start with the links here:
 http://www.**--****.com/ 

Rick Carter
 XXXX@XXXXX.COM 
Chair, Delphi/Paradox SIG, Cincinnati PC Users Group

--- posted by geoForum on  http://www.**--****.com/ 

Re: Re:

Postby Roon » Mon, 01 Jan 2007 11:18:58 GMT

I ran into the problem on occasion and just copied some file to the drive to
change the size of the free disk space.  It happened so infrequently, that
the biggest issue I had was to remember what to do when it happened..






that
"patch"
the




Return to delphi

 

Who is online

Users browsing this forum: No registered users and 83 guest