Computing.Net > Forums > Database > filename concatenation

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

filename concatenation

Reply to Message Icon

Original Message
Name: shk_imran
Date: October 8, 2008 at 01:07:17 Pacific
Subject: filename concatenation
OS: Win 2000
CPU/Ram: 512
Comment:

I have been successful fifty percent in my requirement. i worte this syntax

EXP userid=scott/manager owner=scott rows=y file=c:\BCP_SCOTT_%DATE%

and getting export file with name according to current day of date like:


BCP_SCOTT_Mon
BCP_SCOTT_Tue
BCP_SCOTT_Wed
BCP_SCOTT_Thu
BCP_SCOTT_Fri
BCP_SCOTT_Sat
BCP_SCOTT_Sun

but i want export file with names like

BCP_SCOTT_Mon_06_10_2008
BCP_SCOTT_Tue_07_10_2008
BCP_SCOTT_Wed_08_10_2008
BCP_SCOTT_Thu_09_10_2008
BCP_SCOTT_Fri_10_10_2008
BCP_SCOTT_Sat _11_10_2008
BCP_SCOTT_Sun_12_10_2008

So please tell me how i can add/concatenate this(_05_10_2008) in filename.. ?????????????????

Regards to all friends


Report Offensive Message For Removal


Response Number 1
Name: Elinor
Date: November 14, 2008 at 15:46:22 Pacific
Reply:

Hi,

Have you tried something like:

EXP userid=scott/manager owner=scott rows=y file=c:\BCP_SCOTT_%date:~11%_%date:~8,2%_%date:~5,2%

?

Date format can vary so it may need a little tweaking.

Hth,

Elinor

Elinor Hurst
http://elinorhurst.blogspot.com


Report Offensive Follow Up For Removal

Response Number 2
Name: shk_imran
Date: November 16, 2008 at 22:48:36 Pacific
Reply:

Hi Elinor Hurst,

i am very thankful to you. you solved my problem. again thanx.

Regards,
Imran



Report Offensive Follow Up For Removal







Use following form to reply to current message:

Not Logged In!

You will not be able to post.

Register | Login
   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: filename concatenation

Comments:



Results for: filename concatenation

Approach 97 -5 error
    Summary: Hi - I am attempting to open an approach view file however every time i go to open it i get the following error message: Couldn't open the database(filename)(-5). I am guessing the (-5) part of this ...
www.computing.net/answers/dbase/approach-97-5-error/230.html

tricky sql loop
    Summary: hi guys. thanks in advance for any help on this one. so i am trying to get this semi tricksy loop running in ASE12.5 natively without having to resort to writing a perl script to do the work. let me s...
www.computing.net/answers/dbase/tricky-sql-loop/253.html

pl/sql stored procedure syntax
    Summary: I will first off admit - this is for school. I cannot figure out for the life of me why it won't work. I'm not expecting anyone to give me the answer (but would gladly take it!) but rather am lookin...
www.computing.net/answers/dbase/plsql-stored-procedure-syntax/330.html






Which MP3 player do you have?

iPod/iPhone
Zune
Something Else
None


View Results

Poll Finishes In 4 Days.
Discuss in The Lounge
Poll History






Data Recovery Software