× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



UDT means User defined type and a type could not be changed! A dog is a dog and can't be turned to a cat - never ever.
SQL is a strongly typed language and so you can't assign a cat to a dog without a cast to the same type, if no cast is available, you will get an error. This feature supports the programmer and prevents errors by accident or typo.

Dieter

--------------------------------------------------
From: "Birgitta Hauser" <Hauser@xxxxxxxxxxxxxxx>
Sent: Wednesday, February 02, 2011 6:29 AM
To: "'Midrange Systems Technical Discussion'" <midrange-l@xxxxxxxxxxxx>
Subject: AW: PF Compiled Files with Dictionaries vs. SQL-Created Tables

... but there are 2 disadvantages using UDTs:
1. It is not possible to change an UDT as long as there is a reference on
it.
That means currently your UDT_Customer_Number is VARCHAR(7) but tomorrow
you need to enhance it to VARCHAR(10).
You need to delete ALL objects (Tables/Views) that use this data type
and recreate them after having changed the data type
2. You cannot compare a VARCHAR Field directly to a UDT_Customer_Number
Field, it must always be casted


Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Alan Campin
Gesendet: Tuesday, 01. February 2011 21:55
An: Midrange Systems Technical Discussion
Betreff: Re: PF Compiled Files with Dictionaries vs. SQL-Created Tables

Distinct Types. Not sure what you mean by writing UDF's. In this example,
you are defining customer number to be VARCHAR(7). Now anywhere you define a
field that needs customer number you just say UDT_CUSTOMER_NUMBER.

CREATE DISTINCT TYPE UDT_CUSTOMER_NUMBER AS VARCHAR (7) WITH COMPARISONS ;

LABEL ON DISTINCT TYPE UDT_CUSTOMER_NUMBER IS 'Customer number definition';


On Tue, Feb 1, 2011 at 1:24 PM, DeLong, Eric <EDeLong@xxxxxxxxxxxxxxx>wrote:

Alan, are you referring to SQL User Defined Types (UDTs)? I never used
them, mostly because I didn't want to write all the UDFs needed to
process the UDTs. I'll stick with primitive types, and build this logic
into my service programs.

-Eric DeLong

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Campin
Sent: Tuesday, February 01, 2011 2:03 PM
To: Midrange Systems Technical Discussion
Subject: Re: PF Compiled Files with Dictionaries vs. SQL-Created Tables

This is getting weird. I keep sending responses but they never get
through.

Why not use SQL types? Isn't that what they are for?

On Tue, Feb 1, 2011 at 12:26 PM, Brian Piotrowski <
bpiotrowski@xxxxxxxxxxxxxxx> wrote:

> Thanks for everyone's input. I guess the question now becomes do we
just
> abandon the SQL table creation in favour of PF-style definitions or
not. As
> it stands right now, I would guess 90% of our tables are still in the
> PF-style design. Converting the remaining 10% might be easier in the
long
> run.
>
> Anyhow, it's food for thought for us. We have a plethora of things to
do
> even before we consider this endeavour (such as converting all of our
8i/4i
> dates/times to a proper timestamp), but it's good to know for the
future.
>
> /b;
>
> -----Original Message-----
> From: midrange-l-bounces@xxxxxxxxxxxx [mailto:
> midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Charles Wilt
> Sent: Tuesday, February 01, 2011 2:04 PM
> To: Midrange Systems Technical Discussion
> Subject: Re: PF Compiled Files with Dictionaries vs. SQL-Created
Tables
>
> You can continue to use a "dictionary" file even with SQL created
tables...
>
> Simply use the
> create table MYNEWTBL as
> (SELECT fld1, fld2 from DATADICT)
> with no data
> syntax.
>
> optionally adding "copy options" such as
> INCLUDING IDENTITY COLUMN ATTRIBUTES
> INCLUDING COLUMN DEFAULTS
> ect...
>
> There's been articles done about this, google
> SQL "Field reference files"
>
> HTH,
> Charles
>
>
> On Tue, Feb 1, 2011 at 1:19 PM, Brian Piotrowski
> <bpiotrowski@xxxxxxxxxxxxxxx> wrote:
> > Hi All,
> >
> > For years (prior to my arrival), the programs written around here
were
> all based on physical file definitions. However, these definitions
were
> never really consistent - a field of one type may not be the same type
and
> length in another file. We then began moving to creating tables with
SQL
> statements, keeping in mind the importance of creating fields that
were the
> same type and length regardless of the table in which they were used.
> However, this was cumbersome because we always had to keep a running
list
> of field definitions along with their sizes and types.
> >
> > We're now looking to move back to physical file definitions with a
twist
> - all definitions will be contained in a single dictionary file that
lists
> all of the fields, their types and their lengths. Even though we will
have
> to do a lot of data table conversion, I am hoping this will allow us
to
> centralize the definitions and not have to worry that a field in one
table
> may not be the same in another.
> >
> > Has anyone had any experience similar to our current conundrum and
if so,
> did you solve it using a similar method? If not, what worked best for
you?
> >
> > Thanks!
> >
> > /b;
> >
> > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> > Brian Piotrowski
> > Assistant Mgr. - I.T.
> > Simcoe Parts Service, Inc.
> > Ph: 705-435-7814 x343
> > Fx: 705-435-5029
> > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> > http://www.simcoeparts.com
> >
> > Please consider the environment. Don't print this e-mail unless you
> really need to.
> >
> > The information contained in this communication is confidential and
> intended only for the use of those to whom it is addressed. If you
have
> received this communication in error, please notify me by telephone
(collect
> if necessary) and delete or destroy any copies of it. Thank you!
> >
> > --
> > This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing
> list
> > To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> > To subscribe, unsubscribe, or change list options,
> > visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> > or email: MIDRANGE-L-request@xxxxxxxxxxxx
> > Before posting, please take a moment to review the archives
> > at http://archive.midrange.com/midrange-l.
> >
> >
> --
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>
> --
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>
>
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.