In the Schema Browser, Toad automatically includes the schema name in the name of database objects. For example, when I click on a procedure to see it's source, it goes:
CREATE OR REPLACE PROCEDURE MY_USER.MY_PROCEDURE
Is there a way to disable this? Such that it shows
CREATE OR REPLACE PROCEDURE MY_PROCEDURE
This would make copying code and running it in other schema's a lot easier!
This is not intuitive at all, but the Schema Browser is using the Editor option to include schema names. See the Editor|Open/Save page in Options. Set the "Owner name" value accordingly in the "Object loading" group box.
Always include - always includes schema name
Never include - never includes schema name
Include on loads from other schemas - includes name when the object is not owned by the logged on schema
Related
Due to a requirement in creating multiple SAS libraries from time to time in the MC, I am trying to figure out how to do this programmatically. These libraries are pointing to external databases. So far, using the available examples I was able to use the following code to create library metadata.
proc metadata in='<AddMetadata>
<Metadata>
<SASLibrary
Name="Test Library"
Desc="This is a test"
Folder="\Shared Data\Test"
Engine="DB2"
IsDBMSLibname="1"
IsHidden="0"
Libref="testlib"
IsPreassigned="0"
PublicType="Library">
</SASLibrary>
</Metadata>
<Reposid>A0000001.A849HGWS</Reposid>
<NS>SAS</NS>
<Flags>268435456</Flags>
<Options/>
</AddMetadata>
';
However this is still missing the resource template, schema name, location (folder name). Is there any way we can add these programmatically as well? Also anyway to update the access templates? Any attributes that I can assign these values to when calling proc metadata? Thanks in advance.
You can use the DATA Step function metadata_newobj("SASLibrary", to programmatically create your libraries. Check the documentation for "METADATA_NEWOBJ Function" for further examples of setting the attributes of the library via rc=metadata_setattr(luri,
Functions are ok but troublesome since you must invoke bunch of them to get desired result. XML as a template works best.
If you have access to SAS Management Console I am recommending enabling Metadata Inspector plugin.
cp -r $SASHOME/SASManagementConsole/9.4/plugins/advanced/omitoolsmc $SASHOME/SASManagementConsole/9.4/plugins/
Then in SASMC you are able to browse metadata of all objects using XML queries. Just go to Tools -> XML Metadata Interface.
Below is example XML fetched using this tool. To place this library in specific folder you need to know folder metadata id (Tree association). Same goes to associating library with a server context (DeployedComponents association) and/or DB2 server.
Of course you need only necessary tags. You can ommit empty ones.
<SASLibrary Name="DB2 Library" Desc="Library description" Engine="DB2" IsDBMSLibname="1" IsHidden="0" IsPreassigned="0" Libref="DB2LIB" PublicType="Library">
<AccessControls/>
<Aliases/>
<AliasFor/>
<Changes/>
<CustomAssociations/>
<DefaultLogin/>
<DeployedComponents>
<ServerContext Id="associated context meta id" />
</DeployedComponents>
<Documents/>
(...)
<Timestamps/>
<Trees>
<Tree Id="folder meta id"/>
</Trees>
<TSObjectNamespace/>
<UsedByPackages/>
<UsedByPrototypes/>
<UsingPackages/>
<UsingPrototype/>
<Variables/>
</SASLibrary>
I'm trying to specify a relative path for the source of a droplink/dropsource.
Specifically, I have a folder structure where I have an Authors folder under a certain branch. On the same level of that Authors folder, there can be items or folders with items that will have a droplist that could point to that Authors folder for it's source. The issue though is that this is going to be repeated for multiple clients, so I don't want to have to manually specify the source directory in each case but rather just have a relative source that says basically find the closest Authors folder to me (sibling, aunt/uncle, great aunt/uncle, etc.). Any way to do this? Do I need to use Sitecore query syntax for this?
Yes this is possible with a query.
In the Source field of your droplink Template field set something like:
query:./ancestor-or-self::*[##templatename='yoursitesite']/home/*
or
query:../*
Depend on your exact structure, or template names.
See:
For SXA, see use-a-query-to-determine-the-data-source-context
More explanation sitecore-field-source-as-xpath-query-or-fastquery-cheat-sheet/
One of the fields in my database table is named DATEOFDISCHARGEFROMITU. In any report output, this displays as DATEOFDISCHARGEFRU. I've figured out that the missing characters form the word 'OMIT', which makes me think it's related to this old problem in a previous version of ApEx (I'm using version 4.1.)
Is there a way to display the whole field name in the report header when the field name contains the string 'OMIT'?
Note: Using html character codes will allow the field name to display properly, but then when the report is exported to CSV the character codes are of course shown instead of the full field name. I need a solution that works for exports as well as displaying onscreen.
Platforms (tested): Oracle Application Express (APEX), Version 4.0.2
Note: I am not sure how the linked OTN post is relevant to your problem aside from the coincidence that their file export contains the word "OMIT" and your column title contains the word "OMIT".
It's safe to say that "OMIT" isn't an APEX or ORACLE reserved word that is sabotaging your output. However, if you were talking about a scrap of SQL that attempted to create a table named "SELECT" or "WHERE"
i.e., SELECT * FROM "SELECT" WHERE...
you'll be blocked by the RDBMS from proceeding. :)
I tried an export with a query that contained a column header labeled "OMIT" (see the far right in the example.) The .csv file interpreted by Microsoft Excel looked like this:
I wrote up a separate Q&A post about creating dynamic APEX report headers to answer your follow-on question about a suitable solution for providing a clean, htmlcode-free output when a report is eventually exported to a text, comma separated (or other delimited) output.
In summary, the linked post suggests to set up a dynamic PL/SQL Function within a page item. The page item can be referenced directly in the report column header definition. This is a screenshot demonstrating a possible solution:
The link to the general explanation has more details on the APEX design tasks that gets to this final product.
Onward.
I solved this by using this solution for exporting to csv without an enclosing quote character - as that was another challenge I was faced with for the particular application I was developing. By manually creating the export file I was also able to define the column headings exactly, and the "OMIT" issue did not occur.
Technically that's not a solution for displaying a report with the required headings that can also be exported (Richard's response does that) but it does what I need it to and solves the immediate problem of the DATEOFDISCHARGEFROMITU column heading.
I'm writing an app which saves and loads documents both locally and on iCloud. Locally is working fine, but I'm having a problem with iCloud.
The documents are saved as a package - the UIDocument reads and writes an NSFileWrapper which contains an image file, a thumbnail file, and an info plist. When I save the document to iCloud and then look at the files under 'Manage Storage', I see the individual files instead of the packages; and more importantly when I search for files using NSMetadataQuery it returns an NSMetadataItem for each of the individual files instead of the packages. As a result, my app doesn't realise there are any packages to load and iCloud is pretty useless.
I thought that if I set up the document type and exported the UTI correctly that the packages would be treated properly. Was that right? If so, what's the checklist for setting up a document type as a package? I have:
Added a document type
set LSTypeIsPackage to YES (I've tried string YES and bool YES)
set CFBundleTypeExtensions to an array containing one string: the file suffix
set LSHandlerRank to Owner
Exported a UTI with the same identifier
set it to conform to com.apple.package
added a UITypeTagSpecification dictionary, containing an array for the key public.filename-extension, which contains one string: the file suffix
I've also tried adding a matching Imported UTI to match the exported one, but no luck there.
What did I miss?
UPDATE: I notice that the OP in this question is seeing the behaviour I want (even though he doesn't want it) so it must be possible.
Based on this I tried removing the LSItemContentTypes from my plist, and it worked.
I want to create a hierarchy in my wiki like so:
General
FooPages
Foo1
Foo2
Foo3
ODP
Bar
Baz
I would like to create these pages, and use <<toc>> table of contents macros to organize them.
How can I do that? Do I need to clone and edit the wiki on my own machine, or can I do that exclusively through the web interface?
You can (partially) do this, using <<toc / >>.
This will create a TOC for all the headers in files in the root directory.
It will not list headers in file in the sub directories, though.
You can do the same for <<toc FooPages/ >> etc.
You can do this both through the web interface and locally on your machine.
I placed some TOC examples on this Bitbucket wiki page: http://bitbucket.org/marijnvanderzee/build-wiki/wiki/TocTests. You can view the markup there.
Make sure to balance the equal signs on you headers; e.g. use == H2 == instead of == H2.
Both are valid, but at this time, the latter is not recognized by the <<toc>> macro.
Regarding the hierarchy side of this question, it's worth clarifying:
You can create a hierarchical structure by using the Title field when you create or edit a wiki page.
Eg: If you want to create a new file Bar.md inside a new Foo directory, just create a new page and in the Title field write "Foo/Bar.md". It will create the directory and the file at the same time.
I'm not sure if there's a way to just create the directory without adding a file to it straight away.
Regarding the TOC half of this question, I found that I can use the # HeaderTitle syntax in Markdown pages, and Creole's TOC macro will recognise it.