Problems w/ Concatenate and converting from num to str

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash


Problems w/ Concatenate and converting from num to str

Postby Potato » Tue Jul 15, 2008 8:07 pm

I'm trying to concatenate (CONCAT) two variables, but I keep getting this error message: "Invalid combination of data types in an assignment. Character strings may only be assigned to string variables. Numeric and logical quantities may only be assigned to numeric variables. Consider using the String or Number function." The variables consist of numbers, but I've labeled them as String in data view. I tried using the String funtion in Transform -> Compute Variable, but it won't let me do that either. The command is apparently STRING(numexpr,format) but I have no idea what to put in for format, so I'm getting the error message "The string arguement required for the function specified was not supplied." PLEASE can anyone help? This is giving me an ulcer. :(
Posts: 391
Joined: Sun Dec 28, 2008 5:55 pm
Location: Belo Horizonte, Brasil

Postby Fierce » Tue Feb 10, 2009 12:58 am

COMPUTE VARIABLE transformations that generate string variables require the string variable to be already defined as string. So just create the variable before using the function.

Who is online

Users browsing this forum: No registered users and 1 guest