Having trouble with the following code.having trouble with "zero length"
values. The field in the database is empty and when it goes to insert it
into another table, it chokes. Is there a way to set a " " value as
default? Or do I have to do a cfif on each value? I'm sure I'm missing
something simple here.
<cfquery name="transferData" datasource="brooklineOld">
SELECT *
FROM plumUser
Where ContactType = 3 and userId = 34
</cfquery>
<cfloop query="transferData">
<cfquery name="insertNew" datasource="brookline">
INSERT INTO PlumUser(address1, CellPhone, CellPhoneCarrier, CellPhoneEmail,
City,
CompanyName, ContactType, Country, DateCreated, Email, Extension, Fax,
FirstName, HomePhone,
LastName, OfficePhone, Password, State, Status, SubShortName, UserName,
ZipCode)
VALUES( '#transferData.Address1#', '#transferData.CellPhone#',
'#transferData.CellPhoneCarrier#', '#transferData.CellPhoneEmail#',
'#transferData.City#',
'#transferData.CompanyName#',#transferData.ContactType#,
'#transferData.Country#',
#CreateODBCDate(transferData.DateCreated)#, '#transferData.Email#',
'#transferData.Extension#',
'#transferData.Fax#', '#transferData.FirstName#',
'#transferData.HomePhone#', '#transferData.LastName#',
'#transferData.OfficePhone#', '#transferData.Password#',
'#transferData.State#',#transferData.Status#,
'#transferData.SubShortName#', '#transferData.UserName#',
'#transferData.ZipCode#' )
</cfquery>
</cfloop>
Thanks,
Mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323531
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4