Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Comments in Transform Data Task 1

Status
Not open for further replies.

arst06d

Programmer
Nov 29, 2002
324
Hi

I haave a data transformation task to suck data from our AS400 into SQL Server. In the task I have, for clarity, preceded the qsl statements with a comment block /* ... */.

Executing the individual step in the designer works OK. Running the complete package and this same step fails with the error "SQL0011 - comment not closed". When I look at the sql statement after this has occurred, it is distorted:

Before:
Code:
/*
Apparently, bonds can be identified by having a value in the ISIN field
However, the ISIN number can appear more than once with different 
Security Numbers, the earlier one being closed out - so grab the record with
the highest Sec Num for the ISIN*/


SELECT     trim(B10ESN) AS B10ESN, MAX(B10SCN) AS B10SCN
FROM 
        XSWPDAYLIB.BMF10X13
GROUP BY trim(B10ESN)
HAVING  
    (trim(B10ESN) <> '')
ORDER BY trim(B10ESN)

After:
Code:
/*
AppXSWPDAYLIBB.BMF10X13
GROUP BY trim(B10ESN)
HAVING  
    (trim(B10ESN) <> '')
ORDER BY trim(B10ESN)

Any ideas will be appreciated
 
Here is a quick fix.

<I><B>
--/*
--Apparently, bonds can be identified by having a value
--in the ISIN field
--However, the ISIN number can appear more than once with ---different
--Security Numbers, the earlier one being closed out - so ---grab the record with
--the highest Sec Num for the ISIN
--*/
SELECT trim(B10ESN) AS B10ESN, MAX(B10SCN) AS B10SCN
FROM
XSWPDAYLIB.BMF10X13
GROUP BY trim(B10ESN)
HAVING
(trim(B10ESN) <> '')
ORDER BY trim(B10ESN)
</I></B>

Dr. Sql
goEdeveloper@yahoo.com
Good Luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top