dbTalk Databases Forums  

Problem to specify columns in select statement in DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Problem to specify columns in select statement in DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Marina S.
 
Posts: n/a

Default Problem to specify columns in select statement in DTS - 10-25-2004 , 09:20 AM






Hi Everyone!

I have some strange problem,
I'm creating DTS packeage that will create text file (vertical bar
delimited)
I need to specify 26 columns in select statement.And here I found the
problem:
When I'm trying to execute this query or populate from source
button,it doesn't work,it won't fill the space,and destination with
the data,BUT when I delete one of the columns from select
statement(doesn't matter which one)it works! so I thought maybe there
is some bug that you can specify up to 25 columns in select
statement,however today I found that when I delete one of the
columns,it doesn't work,I have to delete 2 columns,so it's 24 columns
in select statement,it's weird.
And the query is cotrrect,it's running,the results are good.
Here is my query:
select distinct
p1.projectid as 'Prj_Code',
p1.projectid as 'Prj_Name',
p1.projectid as 'Prj_Label',
'' as 'Prj_Sort',
'' as 'Prj_Equ',
'' as 'Prj_Opt',
'' as 'Prj_Oper',
p1.propid as 'Prpty_Code',
p1.entity as 'Entity_Code',
'U' as 'Updated',
p1.fullorpartial as 'Full_Code',
p1.capacity as 'Prj_Cap',
p2.spacetype as 'Space_Code',
p1.occupants as 'Prj_Occupants',
p1.clipnumber as ' Prj_CLIPNO',
p1.clipsubmitted as 'CLIPSub_Code',
p1.reserve as 'Reserve_Code',
p1.status as 'Status_Code',
p1.vacated as 'Vacated_Code',
p1.buapproved as 'BUApp_Code',
p1.bu as 'Prj_BU',
p1.bsSquareFeet as 'Prj_SQ',
p1.disposalstrategy as 'DispStrat_Code',
p1.marketingstatus as 'MktStatus_Code',
p1.nwDisposalDate as 'Prj_DispDate',
p1.expirationdate as 'Prj_ExpDate'
from project p1 join property p2
on p1.propid=p2.propid
where p2.propid is not null and p2.propid <>'0'

Any ideas are appreciated!

Thanks,

Marina

Reply With Quote
  #2  
Old   
Ilya Margolin
 
Posts: n/a

Default Re: Problem to specify columns in select statement in DTS - 10-25-2004 , 04:14 PM






Marina,

May be it is because you file defined with 25 columns?

Ilya
"Marina S." <marina.sukhnev (AT) thinknet (DOT) com> wrote

Quote:
Hi Everyone!

I have some strange problem,
I'm creating DTS packeage that will create text file (vertical bar
delimited)
I need to specify 26 columns in select statement.And here I found the
problem:
When I'm trying to execute this query or populate from source
button,it doesn't work,it won't fill the space,and destination with
the data,BUT when I delete one of the columns from select
statement(doesn't matter which one)it works! so I thought maybe there
is some bug that you can specify up to 25 columns in select
statement,however today I found that when I delete one of the
columns,it doesn't work,I have to delete 2 columns,so it's 24 columns
in select statement,it's weird.
And the query is cotrrect,it's running,the results are good.
Here is my query:
select distinct
p1.projectid as 'Prj_Code',
p1.projectid as 'Prj_Name',
p1.projectid as 'Prj_Label',
'' as 'Prj_Sort',
'' as 'Prj_Equ',
'' as 'Prj_Opt',
'' as 'Prj_Oper',
p1.propid as 'Prpty_Code',
p1.entity as 'Entity_Code',
'U' as 'Updated',
p1.fullorpartial as 'Full_Code',
p1.capacity as 'Prj_Cap',
p2.spacetype as 'Space_Code',
p1.occupants as 'Prj_Occupants',
p1.clipnumber as ' Prj_CLIPNO',
p1.clipsubmitted as 'CLIPSub_Code',
p1.reserve as 'Reserve_Code',
p1.status as 'Status_Code',
p1.vacated as 'Vacated_Code',
p1.buapproved as 'BUApp_Code',
p1.bu as 'Prj_BU',
p1.bsSquareFeet as 'Prj_SQ',
p1.disposalstrategy as 'DispStrat_Code',
p1.marketingstatus as 'MktStatus_Code',
p1.nwDisposalDate as 'Prj_DispDate',
p1.expirationdate as 'Prj_ExpDate'
from project p1 join property p2
on p1.propid=p2.propid
where p2.propid is not null and p2.propid <>'0'

Any ideas are appreciated!

Thanks,

Marina



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.