Custom Toad Attribute Data Types

Hi,

I am modelling a sql Server DWH and would like to know if it is possible to create a custom data type (within Toad) that you can assign to attributes in an entity. I know how to create user data types in SQL server and then use them but this is not what I want to do.

An example would probably illustrate best.

I have multiple staging tables and they all have a natural key and various other text based attributes that I would like to assign the data type ***nvarchar(50)***.

I could go through every entity for each staging table, select nvarchar for each of the attributes from the drop down box, then enter again the number 50 for the length of the nvarchar but this is very time consuming.

What I want to know is:

  1. Is it possible to copy and past nvarchar(50) from one attribute to another in the entity properties dialogue box.

  2. If I can’t do this (I have tried I don’t think I can) can I make a custom data type in TOAD, Just in Toad, of nvarchar(50) and select that for my attribute data type (from the drop down list of data types), instead of having to manually select nvarchar, then entering a length of 50 for every attribute (two steps instead of one).

Please note I do not want/need to create a user defined data type in the database, I have no use for this data type expect that in the absence of being able to copy and paste nvarchar(50) from one attribute to another it would save me alot of time when I am creating my staging table entities in Toad ( probably half the time).

thanks,

D

Two ideas come to mind. Use TDM help (index) and look at both domains and gallery to see which is the better solution for you.

Hi,

please read the following blog article:

www.toadworld.com/…/assign-existing-domain-to-selected-columns.aspx

If you decide to use Domains, the custom package can help you to quickly set the domain to selected table columns.

Regards,

Vaclav

Vaclav,

Exactly what I was looking for, thank you I’d used a similar thing in Erwin just didn’t realise I had to download a custom package to do this in Toad (thought it would have just been included).

Thanks Again.

D

Great, I am glad the package helped you. Good idea to put the functionality to the product directly.

Hi,

Not sure If I should open another post however the solution above has caused me a different problem (albeit a minor one). Now that I using domains to denote the data type and length of my attribute values I have problems when I want to do a "Synchronize--> generate change script" . Toad tells me at the end of the wizard that thee are differences between my attributes, and yes there are, the model uses a domain where as the DDL used to generate the physical tables implements the data types and lengths of the domains I have set up. Toad distinguishes between this as would be expected. I have mocked up an example and attached it (I just inbedded it in another screen dump mentioned below). Is there anyway to make Toad realize that even though I am using a logical domain to define data types and lengths, that the physical implementation actually exists and it in fact reflects what the domain implies? Toad keeps trying to generate alter table statements because of fore mentioned discrepancy. Of course even if I run them it doesn't make any difference, the same discrepancies come up next time I run the wizard because Toad doesn't see a domain on the database side. I don't want this to come up as a discrepancy. I could of course just ignore it but it'd be nice if there was a better way, otherwise I got to keep cutting out the code that gets generated every time I generate the DDL.

I also notice on the screen during the "Synchronize--> generate change script" wizard attached (see capture toad Physical attachment) It does in fact select only physical items to compare? why is it comparing a logical domain I wonder?

thanks,

Dom

Hi,

please modify your Sync & Convert settings this way:

Force Comparison by Data Type

Switch to Detailed object types and properties settings and disable option Domains:

The reason why Domains are being compared when Physical Properties Only item is selected is purely technical.

Using the above mentioned settings you should be able to achieve desired result.

BTW: in next version the specific in-built data types will be supported as standard data types.

Regards,

Vaclav

Thanks this worked.