I know I can use sp_help <datatypename> to get information on a UDT. However is there a way for me to get the base primitive data type through SQL. Querying systypes doesn't seem to give me anything unique to get the primitive type that was used during creation.

asked 07 Sep '11, 10:27

wafyuk's gravatar image

wafyuk
1111
accept rate: 0%

edited 07 Sep '11, 12:16

Volker%20Barth's gravatar image

Volker Barth
40.1k361549819

Are you using SQL Anywhere at all?

"sp_help" makes me think of ASE or MS SQL Server...

(07 Sep '11, 11:19) Volker Barth

Yes it is ASE and v15. This system view is exactly what I am looking for however for some reason I don't have that view (actually I have very system views for some reason). This is a test machine so they may have been dropping views for some odd reason in some of their tests. I'll verify that but this suggestions looks like it will help me. Thanks.

(07 Sep '11, 11:39) wafyuk
Replies hidden

This is a forum for SQL Anywhere, not ASE. Both are completely different database products. Therefore I would suggest to have a look at on one of Sybase's ASE newsgroups - see http://www.sybase.com/detail?id=1012843.

(07 Sep '11, 12:16) Volker Barth

Oh sorry. I must have clicked the wrong link. Too bad as what you suggested seemed pretty simple:-)

(07 Sep '11, 12:27) wafyuk

What version are you using?

v12 has introduced the "base_type_str" field in the "SYSUSERTYPE" system view:

select type_name, base_type_str, * from sysusertype

For older versions, you might need to build such a value based on joining SYSUSERTYPE with SYSDOMAIN.

permanent link

answered 07 Sep '11, 11:17

Volker%20Barth's gravatar image

Volker Barth
40.1k361549819
accept rate: 34%

edited 07 Sep '11, 11:17

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:

×53
×30

question asked: 07 Sep '11, 10:27

question was seen: 3,215 times

last updated: 07 Sep '11, 12:52