tags:

views:

29

answers:

0

I have a column of IDs that I am concatenating in order to pass the list as a parameter to an SQL connection.

The stored procedure uses the parameter buried inside some dynamic SQL, so the formatting I need is odd.

Here is the value I am trying to pass:

'''007','011','017','020','025','030','031','037','046','047','051','055','066','067','079','089','097','110','111','120','157','169','174','196','206','217','232','238','263','264','265','272','280','314','315','337','342','363','366','385','386','387','410','417','432','434','446','486','488','490','499','510','520','533','535','547','578','593','596','598','609','620','622','653','654','671','676','685','700','701','712','718','724','726','735','749','757','761','762','769','772','781','833','834','841','853','854','858','908','911','928','953','962','983','996','997','A12','A14','A46','A49','A59','A81','A84','A86','B01','B06','B13','B17','B27','B28','B42','B63','B98','C09','C24','C26','C46','C51','C52','C53','C66','C70','C72','C96','D03','D19','D20','D24','D31','D45','D54','D56','D58','D62','D64','D65','D67','D71','D73','D76','D78','D81','D87','D99','E01','E04','E17','E20','E24','E34','E38','E39','E54','E55','E56','E57','E72','E73','E83','E97','E99','F05','F07','F13','F19','F21','F25','F30','F37','F39','F43','F44','F45','F50','F62','F63','F66','F72','F78','F82','F84','F87','F88','F91','F97','G02','G03','G08','G10','G14','G17','G21','G30','G36','G37','G38','G39','G44','G48','G49','G50','G55','G60','G65','G68','G72','G77','G79','G92','G93','G94','G95','H16','H27','H28','H29','H34','H38','H39','H47','H50','H64','H65','H72','H93','H96','I02','I20','I22','I23','I30','I31','I32','I33'''

The problem is that the query tool wants this value as text but excel sees it as a number? If I convert the field to text, all I get is #########.

Is there an easy way to work around this?