IB - Developer Center    Forums  Hop To Forum Categories  iWay Products    SET ASNAMES not working if using MYSQL database
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Member
Posted
I am using MYSQL database and retrieving the data to be used in WebFOCUS table...my table names are too long to be used in JOIN so used SET ASNAMES to use the duplicate name in the Join but its not getting recognized.

I would be happy if someone can help me out.

THanking you
 
Posts: 11 | Registered: October 23, 2008Reply With QuoteReport This Post
Member
Posted Hide Post
Could you send a snippet of your code? I am not sure how you are using ASNAMES as a file name substitute for a join?


System 1: Developer Studio 7.6.4 on XP and SQL Server 2000
System 2: WebFOCUS 7.6.4 on Windows Vista and SQL Server 2005
Output: Excel 2000, PDF and HTML
 
Posts: 7 | Location: Lynnwood, WA | Registered: November 02, 2007Reply With QuoteReport This Post
Member
Posted Hide Post
quote:
Originally posted by Allen Richardson:
 SET ASNAMES=ON
SQL MYSQL
  SELECT
    T1.idRoute   AS 'ID',
    T1.Name       AS 'ROUTENAME',
    T2.Description   AS 'DESCRIPTION',
    FROM ROUTE_TAB  T1 LEFT OUTER JOIN CHANNEL T2
    ON T1.idRoute = T2.idRoute
  END
-RUN
TABLE FILE SQLOUT
  PRINT *
  BY ID
  ON TABLE HOLD FORMAT FOCUS INDEX 'ID'
END 


Getting the error that it not recognize the ID.

I'm sure whether the SET ASNAMES affect the SQL query.

This message has been edited. Last edited by: Allen Richardson,
 
Posts: 11 | Registered: October 23, 2008Reply With QuoteReport This Post
Member
Posted Hide Post
Gave the orignal name in INDEX its working fine now...Its not recognizing the Asnames Smiler
 
Posts: 11 | Registered: October 23, 2008Reply With QuoteReport This Post
Platinum Member
Posted Hide Post
ASNAMES only works with TABLE requests. It helps to store fields with a certain name.

Next time you could try to put ?FF in your code. Then you see the exact names and aliases.


Test: WF 7.6.10
Prod: WF 7.6.9
DB: Progress, IBM DB2, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle 9i/10g.
 
Posts: 138 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

IB - Developer Center    Forums  Hop To Forum Categories  iWay Products    SET ASNAMES not working if using MYSQL database

Copyright © 1996-2010 Information Builders, leaders in enterprise business intelligence.