Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

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
9.1k130170257
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
25.0k10142298
accept rate: 41%

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:

×93
×48

question asked: 24 Jun '13, 09:35

question was seen: 1,564 times

last updated: 15 Jul '13, 07:24