October 28, 2009 at 11:32 am
I have this little query, it is being imported into SQL.
My end user would like the 'ecd or emm' field to be a set length (output).
How do I set that?
SELECT DISTINCT
'ecd or emm',
rm.rim_no,
rm.last_name,
rm.first_name,
rm.email_1,
ra.address_line_1,
ra.address_line_2,
ra.address_line_3,
ra.city,
ra.state,
ra.zip,
rm.branch_no
FROM
##ELECTRONIC e (nolock)
--inner join[ssds_core_msphxx.lydianprivatebank.com\core].msphxx.dbo.dp_acct dp (nolock)
--on dp.rim_no = e.rim_no
--inner join [ssds_core_msphxx.lydianprivatebank.com\core].msphxx.dbo.dp_display dd (nolock)
--on dp.acct_no = dd.acct_no and dp.class_code = dd.class_code
inner join [ssds_core_msphxx.lydianprivatebank.com\core].msphxx.dbo.rm_acct rm (nolock)
on rm.rim_no = e.rim_no
inner join [ssds_core_msphxx.lydianprivatebank.com\core].msphxx.dbo.rm_address ra (nolock)
on ra.rim_no = e.rim_no and ra.addr_type_id = 1
--left join [ssds_core_msphxx.lydianprivatebank.com\core].msphxx.dbo.ad_dp_cls adc (nolock)
--on adc.class_code = dp.class_code
October 28, 2009 at 11:39 am
do you mean like this:
SELECT DISTINCT
CONVERT(CHAR(50),'ecd or emm') AS RESULTS,
...
so that it is say, 50 chars, padded with whitespace?
Lowell
October 28, 2009 at 11:47 am
Thanks Lowell!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply