Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

There is a data source column with no name.Each data source column must have a name. Expand / Collapse
Author
Message
Posted Friday, January 28, 2011 4:18 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, May 19, 2011 5:23 AM
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
Post #1055209
Posted Friday, January 28, 2011 4:31 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, May 19, 2011 5:23 AM
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
Post #1055215
Posted Wednesday, October 19, 2011 12:16 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 3, 2013 6:55 PM
Points: 165, Visits: 227
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.
Post #1193119
Posted Monday, July 23, 2012 6:57 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, August 6, 2014 3:10 AM
Points: 2, Visits: 127
Check if any of the column resulted by your query or procedure consists with out column name [no column name]
Post #1333759
Posted Friday, June 14, 2013 2:08 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, June 14, 2013 2:03 AM
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...
Post #1463415
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse