Re: spacing problem in generated query

Jonathan de Halleux <[email protected]> Thu, 30 Oct 2003 20:25:20 +0100
Newsgroups gmane.comp.lib.sql.sqlpp
Message-ID <[email protected]>
--MIMEStream=_0+26926_6080389117948_10177580514
Content-Type: text/plain; charset="us-ascii"; format="flowed"

Waht is you platform ? Windows, Unix, Linux ?

That's strange, I usually don"t get this...

At 13:13 30/10/2003 -0600, you wrote:

>This query was generated using the sql server adaptor.
>
>============= Try a Query================
>
>SELECT
>
>*
>
>FROM AT_AD_COMM_TBL AS Ad Table
>
>INNER JOIN AT_AD_TBL AS ChgObj
>
>ON ChgObj.CO_ID = Ad Table.CO_IDAND ChgObj.PROD_ID = Ad Table.PROD_IDAND 
>ChgObj.BUY_ID = Ad Table.BUY_IDAND ChgObj.AD_ID = Ad Table.AD_ID
>
>GO
>
>============= Generate DB Graph ================
>
>graph G {
>
>graph [bgcolor=white]
>
>node [shape=record fillcolor=lightgrey style=filled]
>
>0[label="AT_AD_COMM_TBL AS Ad Table"];
>
>1[label="AT_AD_TBL AS ChgObj"];
>
>0--1 [headlabel="CO_ID,PROD_ID,BUY_ID,AD_ID"];
>
>}
>
>As you can see there are no spaces following the connectors in the on 
>clause and there is no delimiter around the Names (aliases) with embedded 
>spaces.

I'll have a look at that.

>The generated DDL seems to have a large number of line feeds in some places.
>
>================Create SQL================
>
>USE AT_DEV
>
>GO
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>IF EXISTS (
>
>     SELECT name FROM dbo.sysobjects
>
>     WHERE name = 'FKREF1'
>
>       AND type = 'F'
>
>     )ALTER TABLE AT_MEDIA_SUB_CAT_TBL DROP CONSTRAINT FKREF1
>
>GO
>
>This is not a real problem except that I am outputting the DDL to  an 
>output window and I have to filter them to get an acceptable look.
>
>
>Regards,
>
>Randy Davis
>
>email:[email protected]

-----------------------------------------------------------------------------------
Jonathan de Halleux, Research Assistant
Center for Systems Engineering and Applied Mechanics (CESAME)
Universite catholique de Louvain
Batiment Euler , Av. Georges Lemaitre, 4 Tel : +32-10-47 2595
B-1348 Louvain-la-Neuve Belgium
E-mail : [email protected]
-----------------------------------------------------------------------------------

--MIMEStream=_0+26926_6080389117948_10177580514
Content-Type: text/html; charset="us-ascii"; name="unnamed.html"

<html>
<body>
Waht is you platform ? Windows, Unix, Linux ?<br><br>
That's strange, I usually don&quot;t get this...<br><br>
At 13:13 30/10/2003 -0600, you wrote:<br><br>
<blockquote type=cite class=cite cite><font size=2>This query was
generated using the sql server adaptor.<br>
</font><br>
<font size=2>============= Try a Query================<br>
</font><br>
<font size=2>SELECT <br>
</font><br>
<font size=2>*<br>
</font><br>
<font size=2>FROM AT_AD_COMM_TBL AS Ad Table <br>
</font><br>
<font size=2>INNER JOIN AT_AD_TBL AS ChgObj<br>
</font><br>
<font size=2>ON ChgObj.CO_ID = Ad Table.CO_IDAND ChgObj.PROD_ID = Ad
Table.PROD_IDAND ChgObj.BUY_ID = Ad Table.BUY_IDAND ChgObj.AD_ID = Ad
Table.AD_ID<br>
</font><br>
<font size=2>GO<br>
</font><br>
<font size=2>============= Generate DB Graph ================<br>
</font><br>
<font size=2>graph G {<br>
</font><br>
<font size=2>graph [bgcolor=white]<br>
</font><br>
<font size=2>node [shape=record fillcolor=lightgrey style=filled]<br>
</font><br>
<font size=2>0[label=&quot;AT_AD_COMM_TBL AS Ad Table&quot;];<br>
</font><br>
<font size=2>1[label=&quot;AT_AD_TBL AS ChgObj&quot;];<br>
</font><br>
<font size=2>0--1
[headlabel=&quot;CO_ID,PROD_ID,BUY_ID,AD_ID&quot;];<br>
</font><br>
<font size=2>}<br>
</font><br>
<font size=2>As you can see there are no spaces following the connectors
in the on clause and there is no delimiter around the Names (aliases)
with embedded spaces.</font></blockquote><br>
I'll have a look at that.<br><br>
<blockquote type=cite class=cite cite><font size=2>The generated DDL
seems to have a large number of line feeds in some places.</font>
<br><br>
<font face="Courier New, Courier" size=2>================Create
SQL================<br>
</font><br>
<font face="Courier New, Courier" size=2>USE AT_DEV<br>
</font><br>
<font face="Courier New, Courier" size=2>GO<br>
</font><br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<font face="Courier New, Courier" size=2>IF EXISTS (<br>
</font><br>
<font face="Courier New, Courier" size=2>&nbsp;&nbsp;&nbsp; SELECT name
FROM dbo.sysobjects<br>
</font><br>
<font face="Courier New, Courier" size=2>&nbsp;&nbsp;&nbsp; WHERE name =
'FKREF1'<br>
</font><br>
<font face="Courier New, Courier" size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
AND type = 'F'<br>
</font><br>
<font face="Courier New, Courier" size=2>&nbsp;&nbsp;&nbsp; )ALTER TABLE
AT_MEDIA_SUB_CAT_TBL DROP CONSTRAINT FKREF1<br>
</font><br>
<font face="Courier New, Courier" size=2>GO<br>
</font><br>
<font size=2>This is not a real problem except that I am outputting the
DDL to&nbsp; an output window and I have to filter them to get an
acceptable</font> <font size=2>look.<br>
</font><br><br>
<font size=2><a></a>Regards,<br>
</font><br>
<font size=2>Randy Davis<br>
</font><br>
<font size=2>email:[email protected]<br>
</font></blockquote>
<x-sigsep><p></x-sigsep>
-----------------------------------------------------------------------------------<br>
Jonathan de Halleux, Research Assistant<br>
Center for Systems Engineering and Applied Mechanics (CESAME)<br>
Universite catholique de Louvain <br>
Batiment Euler , Av. Georges Lemaitre, 4 Tel : +32-10-47 2595 <br>
B-1348 Louvain-la-Neuve Belgium <br>
E-mail : [email protected] <br>
-----------------------------------------------------------------------------------<br>
</body>
</html>

--MIMEStream=_0+26926_6080389117948_10177580514--


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/