![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 7 of 7 total |
![]() |
Mon, Feb 27 2006 11:11 AM | Permanent Link |
Andrew Myles | Hi,
I am struggling with what command I need to use to include the current date in the name of a table generated from the INTO command which I then need to export. After making the SELECT command I have the following line: INTO "P:\My Folder\SQL\My Table - DD-MM-YY" <--- I want Day-Month-Year here! I then have FROM, WHERE, GROUP BY, HAVING, ORDER BY commands and the statement finishes with: EXPORT TABLE "P:\My Folder\SQL\My Table - DD-MM-YY" To "P:\My Folder\My Table - DD-MM-YY.csv" WITH HEADERS Any help as to how I go about including the date in my file name would be greatly appreciated! Thanks Andrew |
Mon, Feb 27 2006 11:40 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Andrew
I'd suggest a string replace. Roy Lambert |
Mon, Feb 27 2006 12:01 PM | Permanent Link |
Andrew Myles | Roy Lambert <roy.lambert@skynet.co.uk> wrote:
I'd suggest a string replace. Thanks for a quick response Roy! Could you enlighten me a little more as to how I would go about using the String Replace in this situation. I am somewhat of a noob to SQL!! Thanks Andrew |
Mon, Feb 27 2006 12:51 PM | Permanent Link |
Roy Lambert NLH Associates ![]() | Andrew
1. create the sql statement and before executing it 2. DBISAMQuery1.SQL.Text := StringReplace(DBISAMQuery1.SQL.Text,'DD-MM-YY',whatever date you want as a string, [rfReplaceAll]); 3. execute the sql Roy Lambert |
Mon, Feb 27 2006 12:58 PM | Permanent Link |
Andrew Myles | So that will automatically include the current date in my table name??
It looks to me as though I'd have to type the date in everytime I wanted it to change it.. I want it to pull the current date from the system... |
Mon, Feb 27 2006 1:02 PM | Permanent Link |
Roy Lambert NLH Associates ![]() | Andrew
"whatever date you want as a string" could be DateToStr(Now) ie anything that returns a string. You could equally well use Format Roy Lambert |
Mon, Feb 27 2006 1:06 PM | Permanent Link |
Andrew Myles | Ahhhh right i'm with you!
I'll give it a try tomorrow! Thanks for all your help Roy! |
This web page was last updated on Wednesday, August 14, 2024 at 03:12 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |