Unanswered: truncating numbers returned in a query
direction is appreciated:
my query returns many columns with numbers and text, but the numbers come back with 12.12340000000 or something like that, I would like to keep the significant accuracy, XX.XXXX, but drop the extra meaningless 0's.
thanks, that really rings a bell, that should do the job, i will try it.
I may not know where to put the code exactly. My query looks something like this
Select aas,ddgf,23rf,ast,sdf, from asdfgggh where asdf>=@asdF AND
AND ([Ff] >= @FF) AND (CID LIKE '%@C_ID%')
Two things #1 i tried to insert the convert (numeric(6,4) , ast) is that the correct usage? So I would have to put it in after every column name?
#2 my (CID LIKE '%@C_ID%') doesn't work, the C_ID is a textbox in VisualStudio2008, ([Ff] >= @FF) is also from a text box to create the query, but the CID doesn't work like I thought it should, does not return anything.
this code you just re-iterated does work. "cola LIKE '%' + @some_variable + '%'
I have moved on to a new problem, trying to "parse" the text string that comes back from a column, and add the columns needed to the data grid view. I thought (from a web SQL function page) MID is a function that is known to MS SQL, apparently I am mistaken.
other thoughts on "parsing" a text string read from a column in MS SQL server 2005?