Hi Dan, By combining these columns, do you mean mathematically or as a string?
If a string, maybe try something like: SET monthYear = CAST([month] as varchar) + CAST([year] as varchar) Without the casting, your previous statement would try to perform some math if one or both columns are numbers. I hope that helps. Scott, On Friday, January 7, 2011 8:08am, "Dan Stein" <[email protected]> said: > I have a MS SQL table that has about 2M records in it. I had to add a field > that > is actually a combination of the month and year to it for some reports I am > running. Foolishly I named columns month, year, day in this table so I think > it > is a problem with trying to write a query that takes the month value and > combines > it with the year value to give me month year. > > I tried writing something like > > Update tableA > > Set monthYear= [TableA].[month] + [TableA].[year] > where mothYear is null > > All it does it set it to the year value. > > > -- > Dan Stein MSN CPNP > FileMaker 7 Certified Developer > FileMaker 9 Certified Developer > Digital Software Solutions > 303 W. Chestnut St > Souderton PA 18964 > Land: 215-799-0192 > Cell: 610-256-2843 > Fax 215-799-0192 ( Call 1st) > FMP, WiTango,MSSQL, MySQL,PHP > [email protected] > www.dss-db.com > > > "It's very hard to grow, because it's difficult to let go of models of > ourselves in which we've invested so heavily." > > > > > > > > > ---------------------------------------- > > To unsubscribe from this list, please send an email to [email protected] > with > "unsubscribe witango-talk" in the body. > > ---------------------------------------- To unsubscribe from this list, please send an email to [email protected] with "unsubscribe witango-talk" in the body.
