Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


There is a data source column with no name.Each data source column must have a name.


There is a data source column with no name.Each data source column must have a name.

Author
Message
David Jahngir
David Jahngir
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 42
Problem fixed using the below code and adding the as col1 highlighted

--File 2 OPTION.txt
SELECT DISTINCT
   B12.MODLN_USC_C + ';' +
   LEFT(ENT_ENTITY_C, 1) +
      SUBSTRING(ENT_ENTITY_C, 3, 1) +
      SUBSTRING(ENT_ENTITY_C, 6, 1) +
      SUBSTRING(ENT_ENTITY_C, 4, 1) +
      SUBSTRING(ENT_ENTITY_C, 5, 1) + ';' +
   b10Opt.USC_C + ';' +
   LTRIM(RTRIM(ISNULL(B10Opt.USC_DESC_X, ''))) as col1
FROM   
   (select ent_entity_c, modln_usc_c, ent_opt_usc_c
   from CDMStaging..mfslb12_entlst
   where MKT_C = 'FF' AND ENT_STATUS_C IN ('O','B')) AS b12
INNER JOIN
   (SELECT usc_c, usc_desc_x
   FROM CDMStaging..mfslb10_elm
   where mkt_c = 'FF') As B10Opt
   on CHARINDEX(B10Opt.usc_c, B12.ENT_OPT_USC_C) > 0
ORDER BY 1
David Jahngir
David Jahngir
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 42
Problem solved with the below code and adding (as col1) where highlighted..

--File 2 OPTION.txt
SELECT DISTINCT
   B12.MODLN_USC_C + ';' +
   LEFT(ENT_ENTITY_C, 1) +
      SUBSTRING(ENT_ENTITY_C, 3, 1) +
      SUBSTRING(ENT_ENTITY_C, 6, 1) +
      SUBSTRING(ENT_ENTITY_C, 4, 1) +
      SUBSTRING(ENT_ENTITY_C, 5, 1) + ';' +
   b10Opt.USC_C + ';' +
   LTRIM(RTRIM(ISNULL(B10Opt.USC_DESC_X, ''))) as col1
FROM   
   (select ent_entity_c, modln_usc_c, ent_opt_usc_c
   from CDMStaging..mfslb12_entlst
   where MKT_C = 'FF' AND ENT_STATUS_C IN ('O','B')) AS b12
INNER JOIN
   (SELECT usc_c, usc_desc_x
   FROM CDMStaging..mfslb10_elm
   where mkt_c = 'FF') As B10Opt
   on CHARINDEX(B10Opt.usc_c, B12.ENT_OPT_USC_C) > 0
ORDER BY 1
Ray Sotkiewicz
Ray Sotkiewicz
SSC-Enthusiastic
SSC-Enthusiastic (165 reputation)SSC-Enthusiastic (165 reputation)SSC-Enthusiastic (165 reputation)SSC-Enthusiastic (165 reputation)SSC-Enthusiastic (165 reputation)SSC-Enthusiastic (165 reputation)SSC-Enthusiastic (165 reputation)SSC-Enthusiastic (165 reputation)

Group: General Forum Members
Points: 165 Visits: 271
The reason you're getting the "No Column Name" error is because you're using temp tables. SSIS can't read metadata from your statement due to this issue.

My workaround is instead of using temp tables, I use permanent staging tables, and divide the failing query into 2 sections:

1. Stage the data
2. Read the data.

Works every time.
lovinglychinna
lovinglychinna
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 162
Check if any of the column resulted by your query or procedure consists with out column name [no column name]
jeimarzsupan
jeimarzsupan
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 0
Just always make sure to put an alias to any column you are customizing/formatting. It's like this:

SELECT ID,
FName+' '+MNane+' 'LName FullName, --on this Line, Name is the Alias
ISNULL(Address, 'TBD') FullAddress, --on this Line, FullAddress is the Alias
Occupation,
Month(Birthday) BirthMonth --on this Line, it is the BirthMonth
FROM TBL_PeronalInfo

Hope I explained it clearly...
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search