The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

This is no real question, more something I stumbled upon:

Unload will create 1 subdir, but not a hierarchy of 2?

If directory X doesn't exist it is not created in the following statement:

unload select * from T into file 'c:\\X\\Y\\file.txt'
you get: ERROR Cannot access file 'c:\X\Y\file.txt' -- No such file or directory

but if X exists the not existing Y will be created.

asked 24 Jun '13, 09:35

Martin's gravatar image

Martin
8.6k114149237
accept rate: 14%

edited 24 Jun '13, 09:35


For what ever reason, perhaps historical or perhaps a simple omission, the code that creates/opens the output file for the unload statement only attempts to create the parent directory ... and does not handle the case of a non-existent parent's parent directory.

It would be a reasonable (and fairly easy to implement) enhancement to create multiple levels of directories.

permanent link

answered 24 Jun '13, 09:55

Mark%20Culp's gravatar image

Mark Culp
22.3k9129262
accept rate: 40%

IIRC Backup Database is behaving identically, while dbbackup will prompt for creation of a single sub folder.

(15 Jul '13, 07:24) Reimer Pods
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×78
×35

question asked: 24 Jun '13, 09:35

question was seen: 461 times

last updated: 15 Jul '13, 07:24