dbTalk Databases Forums  

Pervasive Formatting...

comp.databases.btrieve comp.databases.btrieve


Discuss Pervasive Formatting... in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ChrisM
 
Posts: n/a

Default Pervasive Formatting... - 09-01-2004 , 09:57 AM






Hi Group,

If I'm creating a new View in Pervasive SQL Control Centre (v8.6)

I enter my new view as (for example)



SELECT OracleCount.Id, OracleCount.ProductId, Products.Description,
AgreementToSupply.Description, Units.Name
FROM OracleCount,AgreementToSupply ,Products ,Units
WHERE OracleCount.ProductId = Products.Id
AND OracleCount.ProductId = AgreementToSupply.ProductId
AND OracleCount.BranchId = AgreementToSupply.UnitId
AND Units.UnitId = OracleCount.BranchId

Which is hopefully quite clear and easy to read.

Pervasive 'helpfully' converts this into:

SELECT "T1" ."Id" ,"T1" ."ProductId" ,"T3" ."Description" ,"T2"
.."Description" ,"T4"
.."Name" FROM "OracleCount" "T1" ,"AgreementToSupply" "T2" ,"Products" "T3"
,"Units" "T4"
WHERE "T1" ."ProductId" = "T3" ."Id" AND "T1" ."ProductId" = "T2"
.."ProductId" AND "T1"
.."BranchId" = "T2" ."UnitId" AND "T4" ."UnitId" = "T1" ."BranchId"

Which is logically the same, but a bleedin' nightmare to follow. Anyone know
if there is a way to keep my version and stop Pervasive from changing it (If
I promise not to put spaces in my table/field names...)

Yours frustratedly,

ChrisM.

--
Please remove shoes to reply

But what ... is it good for?
- Engineer at the Advanced Computing Systems Division of IBM, 1968,
commenting on the microchip.



Reply With Quote
  #2  
Old   
Bill Bach
 
Posts: n/a

Default Re: Pervasive Formatting... - 09-03-2004 , 11:12 AM






What you are looking at is the internal representation of the VIEW.DDF
structure. To keep your original query, simply keep your original query -- i.e.
the keep the SQL query in a text file.
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Pervasive.SQL Service & Support Classes ***
Chicago: August, 2004: See our web site for details!


ChrisM wrote:

Quote:
Hi Group,

If I'm creating a new View in Pervasive SQL Control Centre (v8.6)

I enter my new view as (for example)

SELECT OracleCount.Id, OracleCount.ProductId, Products.Description,
AgreementToSupply.Description, Units.Name
FROM OracleCount,AgreementToSupply ,Products ,Units
WHERE OracleCount.ProductId = Products.Id
AND OracleCount.ProductId = AgreementToSupply.ProductId
AND OracleCount.BranchId = AgreementToSupply.UnitId
AND Units.UnitId = OracleCount.BranchId

Which is hopefully quite clear and easy to read.

Pervasive 'helpfully' converts this into:

SELECT "T1" ."Id" ,"T1" ."ProductId" ,"T3" ."Description" ,"T2"
."Description" ,"T4"
."Name" FROM "OracleCount" "T1" ,"AgreementToSupply" "T2" ,"Products" "T3"
,"Units" "T4"
WHERE "T1" ."ProductId" = "T3" ."Id" AND "T1" ."ProductId" = "T2"
."ProductId" AND "T1"
."BranchId" = "T2" ."UnitId" AND "T4" ."UnitId" = "T1" ."BranchId"

Which is logically the same, but a bleedin' nightmare to follow. Anyone know
if there is a way to keep my version and stop Pervasive from changing it (If
I promise not to put spaces in my table/field names...)

Yours frustratedly,

ChrisM.

--
Please remove shoes to reply

But what ... is it good for?
- Engineer at the Advanced Computing Systems Division of IBM, 1968,
commenting on the microchip.


Reply With Quote
  #3  
Old   
ChrisM
 
Posts: n/a

Default Re: Pervasive Formatting... - 09-06-2004 , 11:43 AM



Hi Bill,

Thanks for your reply.

So you're saying that I should save a text file for each View that I create
(separate from the SQL that Pervasive saves internally). Then if I want to
change my view, I load my SQL file up and re-run it, hmmm OK, if that's the
way it works then fair enough I guess...
btw, if I forget to save the SQL file before I click OK to create the view
(and hence lose my formatting) Then 'tough'. If I want my formatted query I
have to re-construct it...?

Kind regards,

Chris.



--
Please remove shoes to reply

But what ... is it good for?
- Engineer at the Advanced Computing Systems Division of IBM, 1968,
commenting on the microchip.
"Bill Bach" <bbach (AT) cncdsl (DOT) com> wrote

Quote:
What you are looking at is the internal representation of the VIEW.DDF
structure. To keep your original query, simply keep your original
query -- i.e.
the keep the SQL query in a text file.
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Pervasive.SQL Service & Support Classes ***
Chicago: August, 2004: See our web site for details!


ChrisM wrote:

Hi Group,

If I'm creating a new View in Pervasive SQL Control Centre (v8.6)

I enter my new view as (for example)

SELECT OracleCount.Id, OracleCount.ProductId, Products.Description,
AgreementToSupply.Description, Units.Name
FROM OracleCount,AgreementToSupply ,Products ,Units
WHERE OracleCount.ProductId = Products.Id
AND OracleCount.ProductId = AgreementToSupply.ProductId
AND OracleCount.BranchId = AgreementToSupply.UnitId
AND Units.UnitId = OracleCount.BranchId

Which is hopefully quite clear and easy to read.

Pervasive 'helpfully' converts this into:

SELECT "T1" ."Id" ,"T1" ."ProductId" ,"T3" ."Description" ,"T2"
."Description" ,"T4"
."Name" FROM "OracleCount" "T1" ,"AgreementToSupply" "T2" ,"Products"
"T3"
,"Units" "T4"
WHERE "T1" ."ProductId" = "T3" ."Id" AND "T1" ."ProductId" = "T2"
."ProductId" AND "T1"
."BranchId" = "T2" ."UnitId" AND "T4" ."UnitId" = "T1" ."BranchId"

Which is logically the same, but a bleedin' nightmare to follow. Anyone
know
if there is a way to keep my version and stop Pervasive from changing it
(If
I promise not to put spaces in my table/field names...)

Yours frustratedly,

ChrisM.

--
Please remove shoes to reply

But what ... is it good for?
- Engineer at the Advanced Computing Systems Division of IBM, 1968,
commenting on the microchip.




Reply With Quote
  #4  
Old   
Bill Bach
 
Posts: n/a

Default Re: Pervasive Formatting... - 09-07-2004 , 07:01 AM



That would be correct. Yet another reason to NOT use the user interface for
building things like queries, tables, users, etc. While the UI is nice for the
uninitiated, having a SQL script is the only way to go for real administrators.
Of course, this also allows you to add extensive comments to the files as well,
further improving readability.
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Pervasive.SQL Service & Support Classes ***
Chicago: August, 2004: See our web site for details!


ChrisM wrote:

Quote:
Hi Bill,

Thanks for your reply.

So you're saying that I should save a text file for each View that I create
(separate from the SQL that Pervasive saves internally). Then if I want to
change my view, I load my SQL file up and re-run it, hmmm OK, if that's the
way it works then fair enough I guess...
btw, if I forget to save the SQL file before I click OK to create the view
(and hence lose my formatting) Then 'tough'. If I want my formatted query I
have to re-construct it...?

Kind regards,

Chris.

--
Please remove shoes to reply

But what ... is it good for?
- Engineer at the Advanced Computing Systems Division of IBM, 1968,
commenting on the microchip.
"Bill Bach" <bbach (AT) cncdsl (DOT) com> wrote in message
news:41389814.67DD5DFC (AT) cncdsl (DOT) com...
What you are looking at is the internal representation of the VIEW.DDF
structure. To keep your original query, simply keep your original
query -- i.e.
the keep the SQL query in a text file.
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Pervasive.SQL Service & Support Classes ***
Chicago: August, 2004: See our web site for details!


ChrisM wrote:

Hi Group,

If I'm creating a new View in Pervasive SQL Control Centre (v8.6)

I enter my new view as (for example)

SELECT OracleCount.Id, OracleCount.ProductId, Products.Description,
AgreementToSupply.Description, Units.Name
FROM OracleCount,AgreementToSupply ,Products ,Units
WHERE OracleCount.ProductId = Products.Id
AND OracleCount.ProductId = AgreementToSupply.ProductId
AND OracleCount.BranchId = AgreementToSupply.UnitId
AND Units.UnitId = OracleCount.BranchId

Which is hopefully quite clear and easy to read.

Pervasive 'helpfully' converts this into:

SELECT "T1" ."Id" ,"T1" ."ProductId" ,"T3" ."Description" ,"T2"
."Description" ,"T4"
."Name" FROM "OracleCount" "T1" ,"AgreementToSupply" "T2" ,"Products"
"T3"
,"Units" "T4"
WHERE "T1" ."ProductId" = "T3" ."Id" AND "T1" ."ProductId" = "T2"
."ProductId" AND "T1"
."BranchId" = "T2" ."UnitId" AND "T4" ."UnitId" = "T1" ."BranchId"

Which is logically the same, but a bleedin' nightmare to follow. Anyone
know
if there is a way to keep my version and stop Pervasive from changing it
(If
I promise not to put spaces in my table/field names...)

Yours frustratedly,

ChrisM.

--
Please remove shoes to reply

But what ... is it good for?
- Engineer at the Advanced Computing Systems Division of IBM, 1968,
commenting on the microchip.



Reply With Quote
  #5  
Old   
ChrisM
 
Posts: n/a

Default Re: Pervasive Formatting... - 09-07-2004 , 10:00 AM



Bill,

Sorry if this is a dumb question

When you say you don't recommend using the UI, what exactly should I use?
Is there a command prompt type interface somewhere? Or should I just use
the 'SQL Data Manager' screen and load/run various SQL scripts to acomplish
my tasks...

Thanks,

Chris.

--
Please remove shoes to reply

But what ... is it good for?
- Engineer at the Advanced Computing Systems Division of IBM, 1968,
commenting on the microchip.
"Bill Bach" <bbach (AT) cncdsl (DOT) com> wrote

Quote:
That would be correct. Yet another reason to NOT use the user interface
for
building things like queries, tables, users, etc. While the UI is nice
for the
uninitiated, having a SQL script is the only way to go for real
administrators.
Of course, this also allows you to add extensive comments to the files as
well,
further improving readability.
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Pervasive.SQL Service & Support Classes ***
Chicago: August, 2004: See our web site for details!


ChrisM wrote:

Hi Bill,

Thanks for your reply.

So you're saying that I should save a text file for each View that I
create
(separate from the SQL that Pervasive saves internally). Then if I want
to
change my view, I load my SQL file up and re-run it, hmmm OK, if that's
the
way it works then fair enough I guess...
btw, if I forget to save the SQL file before I click OK to create the
view
(and hence lose my formatting) Then 'tough'. If I want my formatted
query I
have to re-construct it...?

Kind regards,

Chris.

--
Please remove shoes to reply

But what ... is it good for?
- Engineer at the Advanced Computing Systems Division of IBM, 1968,
commenting on the microchip.
"Bill Bach" <bbach (AT) cncdsl (DOT) com> wrote in message
news:41389814.67DD5DFC (AT) cncdsl (DOT) com...
What you are looking at is the internal representation of the VIEW.DDF
structure. To keep your original query, simply keep your original
query -- i.e.
the keep the SQL query in a text file.
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Pervasive.SQL Service & Support Classes ***
Chicago: August, 2004: See our web site for details!


ChrisM wrote:

Hi Group,

If I'm creating a new View in Pervasive SQL Control Centre (v8.6)

I enter my new view as (for example)

SELECT OracleCount.Id, OracleCount.ProductId, Products.Description,
AgreementToSupply.Description, Units.Name
FROM OracleCount,AgreementToSupply ,Products ,Units
WHERE OracleCount.ProductId = Products.Id
AND OracleCount.ProductId = AgreementToSupply.ProductId
AND OracleCount.BranchId = AgreementToSupply.UnitId
AND Units.UnitId = OracleCount.BranchId

Which is hopefully quite clear and easy to read.

Pervasive 'helpfully' converts this into:

SELECT "T1" ."Id" ,"T1" ."ProductId" ,"T3" ."Description" ,"T2"
."Description" ,"T4"
."Name" FROM "OracleCount" "T1" ,"AgreementToSupply" "T2"
,"Products"
"T3"
,"Units" "T4"
WHERE "T1" ."ProductId" = "T3" ."Id" AND "T1" ."ProductId" = "T2"
."ProductId" AND "T1"
."BranchId" = "T2" ."UnitId" AND "T4" ."UnitId" = "T1" ."BranchId"

Which is logically the same, but a bleedin' nightmare to follow.
Anyone
know
if there is a way to keep my version and stop Pervasive from
changing it
(If
I promise not to put spaces in my table/field names...)

Yours frustratedly,

ChrisM.

--
Please remove shoes to reply

But what ... is it good for?
- Engineer at the Advanced Computing Systems Division of IBM, 1968,
commenting on the microchip.





Reply With Quote
  #6  
Old   
Bill Bach
 
Posts: n/a

Default Re: Pervasive Formatting... - 09-09-2004 , 09:36 PM



The latter -- load your scripts into the SQLDM window & run them there.
BB

ChrisM wrote:

Quote:
Bill,

Sorry if this is a dumb question

When you say you don't recommend using the UI, what exactly should I use?
Is there a command prompt type interface somewhere? Or should I just use
the 'SQL Data Manager' screen and load/run various SQL scripts to acomplish
my tasks...

Thanks,

Chris.

--
Please remove shoes to reply

But what ... is it good for?
- Engineer at the Advanced Computing Systems Division of IBM, 1968,
commenting on the microchip.
"Bill Bach" <bbach (AT) cncdsl (DOT) com> wrote in message
news:413DA32D.DE457057 (AT) cncdsl (DOT) com...
That would be correct. Yet another reason to NOT use the user interface
for
building things like queries, tables, users, etc. While the UI is nice
for the
uninitiated, having a SQL script is the only way to go for real
administrators.
Of course, this also allows you to add extensive comments to the files as
well,
further improving readability.
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Pervasive.SQL Service & Support Classes ***
Chicago: August, 2004: See our web site for details!


ChrisM wrote:

Hi Bill,

Thanks for your reply.

So you're saying that I should save a text file for each View that I
create
(separate from the SQL that Pervasive saves internally). Then if I want
to
change my view, I load my SQL file up and re-run it, hmmm OK, if that's
the
way it works then fair enough I guess...
btw, if I forget to save the SQL file before I click OK to create the
view
(and hence lose my formatting) Then 'tough'. If I want my formatted
query I
have to re-construct it...?

Kind regards,

Chris.

--
Please remove shoes to reply

But what ... is it good for?
- Engineer at the Advanced Computing Systems Division of IBM, 1968,
commenting on the microchip.
"Bill Bach" <bbach (AT) cncdsl (DOT) com> wrote in message
news:41389814.67DD5DFC (AT) cncdsl (DOT) com...
What you are looking at is the internal representation of the VIEW.DDF
structure. To keep your original query, simply keep your original
query -- i.e.
the keep the SQL query in a text file.
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Pervasive.SQL Service & Support Classes ***
Chicago: August, 2004: See our web site for details!


ChrisM wrote:

Hi Group,

If I'm creating a new View in Pervasive SQL Control Centre (v8.6)

I enter my new view as (for example)

SELECT OracleCount.Id, OracleCount.ProductId, Products.Description,
AgreementToSupply.Description, Units.Name
FROM OracleCount,AgreementToSupply ,Products ,Units
WHERE OracleCount.ProductId = Products.Id
AND OracleCount.ProductId = AgreementToSupply.ProductId
AND OracleCount.BranchId = AgreementToSupply.UnitId
AND Units.UnitId = OracleCount.BranchId

Which is hopefully quite clear and easy to read.

Pervasive 'helpfully' converts this into:

SELECT "T1" ."Id" ,"T1" ."ProductId" ,"T3" ."Description" ,"T2"
."Description" ,"T4"
."Name" FROM "OracleCount" "T1" ,"AgreementToSupply" "T2"
,"Products"
"T3"
,"Units" "T4"
WHERE "T1" ."ProductId" = "T3" ."Id" AND "T1" ."ProductId" = "T2"
."ProductId" AND "T1"
."BranchId" = "T2" ."UnitId" AND "T4" ."UnitId" = "T1" ."BranchId"

Which is logically the same, but a bleedin' nightmare to follow.
Anyone
know
if there is a way to keep my version and stop Pervasive from
changing it
(If
I promise not to put spaces in my table/field names...)

Yours frustratedly,

ChrisM.

--
Please remove shoes to reply

But what ... is it good for?
- Engineer at the Advanced Computing Systems Division of IBM, 1968,
commenting on the microchip.




Reply With Quote
  #7  
Old   
ChrisM
 
Posts: n/a

Default Re: Pervasive Formatting... - 09-10-2004 , 06:29 AM





"Bill Bach" <bbach (AT) cncdsl (DOT) com> wrote

Quote:
The latter -- load your scripts into the SQLDM window & run them there.
BB

:-/ Oh, that seems a bit rubbish .

AND no user definable functions :-(

Still, if thats they way it is...

Think I'll go back to MS-Access/Jet ;-)

Thanks for you help Bill.

Cheers,

Chris.



--
Please remove shoes to reply

But what ... is it good for?
- Engineer at the Advanced Computing Systems Division of IBM, 1968,
commenting on the microchip.





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.