SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Bad SQL after formattig (on Version 4)

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Bad SQL after formattig (on Version 4)
Author Message
drama



Joined: 05 Dec 2006
Posts: 10

Post Bad SQL after formattig (on Version 4) Reply with quote
I typed in the following SQL:

Code:
SELECT * FROM SD_FIELDSALIAS WHERE
( nvl(FIELD_ID,'-1'), nvl(FIELD_NAME,'-1'), nvl(TABLE_NAME,'-1')) in
(SELECT  nvl(FIELD_ID,'-1'), nvl(FIELD_NAME,'-1'), nvl(TABLE_NAME,'-1') FROM (
SELECT SERVICE_SOURCE_TYPE,SERVICE_SOURCE,TABLE_NAME,FIELD_NAME,ALIAS,COLUMN_ALIAS,FIELD_ID,FIELDTYPE,CONTROL_TYPE,FORMAT_STYLE,CONTENT_SOURCE,FAILURE_ACTION,ACCESS_KEY,MAX_LENGTH,DEFAULT_VALUE,AUDIT_LOOKUP_SOURCE,COLUMN_WIDTH,DESCRIPTION,FIELD_VALUE_LIST,VALUE_COLUMN_NAME,VALIDATE_ON_SERVER
 FROM SD_FIELDSALIAS
 MINUS
SELECT SERVICE_SOURCE_TYPE,SERVICE_SOURCE,TABLE_NAME,FIELD_NAME,ALIAS,COLUMN_ALIAS,FIELD_ID,FIELDTYPE,CONTROL_TYPE,FORMAT_STYLE,CONTENT_SOURCE,FAILURE_ACTION,ACCESS_KEY,MAX_LENGTH,DEFAULT_VALUE,AUDIT_LOOKUP_SOURCE,COLUMN_WIDTH,DESCRIPTION,FIELD_VALUE_LIST,VALUE_COLUMN_NAME,VALIDATE_ON_SERVER
 FROM hub_ma2.SD_FIELDSALIAS ))



After using format (CTRL +F11) I gat bad SQL:
Code:

/************************************************************
 * Code formatted by SoftTree SQL Assistant © v4.0.20
 * Time: 10/5/2008 8:03:30 PM
 ************************************************************/

SELECT
   *
FROM
   SD_FIELDSALIAS
WHERE
   (
      NVL(FIELD_ID ,'-1')
      ,NVL(FIELD_NAME ,'-1')
      ,NVL(TABLE_NAME ,'-1')
   ) IN (SELECT
            NVL(FIELD_ID ,'-1')
            ,NVL(FIELD_NAME ,'-1')
            ,NVL(TABLE_NAME ,'-1')
         FROM
            (
               SELECT
                  SERVICE_SOURCE_TYPE
                  ,SERVICE_SOURCE
                  ,TABLE_NAME
                  ,FIELD_NAME
                  ,ALIAS
                  ,COLUMN_ALIAS
                  ,FIELD_ID
                  ,FIELDTYPE
                  ,CONTROL_TYPE
                  ,FORMAT_STYLE
                  ,CONTENT_SOURCE
                  ,FAILURE_ACTION
                  ,ACCESS_KEY
                  ,MAX_LENGT
                   H
                      ,DEFAULT_VALUE
                  ,AUDIT_LOOKUP_SOURCE
                  ,COLUMN_WIDTH
                  ,DESCRIPTION
                  ,FIELD_VALUE_LIST
                  ,VALUE_COLUMN_NAME
                  ,VALIDATE_ON_SERVER
               FROM
                  SD_FIELDSALIAS
               MINUS
               SELECT
                  SERVICE_SOURCE_TYPE
                  ,SERVICE_SOURCE
                  ,TABLE_NAME
                  ,FIELD_NAME
                  ,ALIAS
                  ,COLUMN_ALIAS
                  ,FIELD_ID
                  ,FIELDTYPE
                  ,CONTROL_TYPE
                  ,FORMAT_STYLE
                  ,CONTENT_SOURCE
                  ,FAILURE_ACTION
                  ,ACCESS_KEY
                  ,MAX_LENGT
                   H
                  ,DEFAULT_VALUE
                  ,AUDIT_LOOKUP_SOURCE
                  ,COLUMN_WIDTH
                  ,DESCRIPTION
                  ,FIELD_VALUE_LIST
                  ,VALUE_COLUMN_NAME
                  ,VALIDATE_ON_SERVER
               FROM
                  hub_ma2.SD_FIELDSALIAS
            ))



you can see formatter cut the field MAX_LENGTH into 'MAX_LENGT' and 'H'
Sun Oct 05, 2008 2:08 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
I'm unable to reproduce this issue. I tried DB Tools and tried Notepad. Which editor are you using?
Sun Oct 05, 2008 8:39 pm View user's profile Send private message
drama



Joined: 05 Dec 2006
Posts: 10

Post Reply with quote
I am using an internal appliction (Written in VB6) the SQL Assistent is working on Rich text edit. (RichTextWndClass)
Tue Oct 07, 2008 10:14 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
This could be caused by your application trying to do something, non-printable ASCII characters in the code or something else outside of SQL Assistant. To verify, enable Notepad target, copy the same SQL code and format there. If you don't get identical result, then your application is doing something that is affecting the code formatting.

By the way, are you aware of SQL Assistant API?
Tue Oct 07, 2008 7:18 pm View user's profile Send private message
drama



Joined: 05 Dec 2006
Posts: 10

Post Reply with quote
Where can I read on SQL Assistant API. (could not find in the 3.5 PDF)
Sun Oct 12, 2008 7:33 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
Please check out http://www.softtreetech.com/sqlassist/api.htm
Sun Oct 12, 2008 11:11 am View user's profile Send private message
drama



Joined: 05 Dec 2006
Posts: 10

Post Reply with quote
Looks Cool!

where can I find some documentation / source for this?
Wed Oct 22, 2008 5:39 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
Hi, the documentation and sources are provided to licensees only.
Wed Oct 22, 2008 8:31 am View user's profile Send private message
Daveii



Joined: 10 Dec 2008
Posts: 22
Country: United States

Post API Info Reply with quote
I have a license. Where can I obtain the API documentation and source?
Wed Dec 10, 2008 9:28 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
Did you mean that you have a user license for SQL Assistant, or you have licensed the API?
Wed Dec 10, 2008 10:46 am View user's profile Send private message
Daveii



Joined: 10 Dec 2008
Posts: 22
Country: United States

Post Reply with quote
I have SQL Assist. I don't see a separate product listed on the http://www.softtreetech.com/isql.htm page. I'd like to learn more about the product but it seems rather difficult to find a trial, documentation, or description. What's up?
Wed Dec 10, 2008 12:59 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
Please follow the API link on this server http://www.softtree.com/sqlassist/index.shtml. This will lead you to the description and download of a demo project created in VB6 using ODBC and SQL Server as a backend. If you are interested in adding it to a NET type project and need C# or similar sample, please contact our sales guys sales@*NOSPAM*softtreetech.com and ask for further assistance with this matter. Remove *NOSMAP* suffix after pasing the email.
Wed Dec 10, 2008 1:08 pm View user's profile Send private message
Daveii



Joined: 10 Dec 2008
Posts: 22
Country: United States

Post Reply with quote
Perfect. Thanks!
Wed Dec 10, 2008 1:13 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.