1C++. Как получить в функции запроса целую или дробную часть числа? #137860


#0 by aKomper
Хотелось бы из одного числового поля таблицы получить целую и дробную части как результат работы двух функций
#2 by aKomper
1 - она будет работать на прямых запросах?
#3 by aKomper
...
#4 by Юрикс
ROUNDReturns a numeric expression, rounded to the specified length or precision.SyntaxROUND ( numeric_expression , length [ , function ] )Argumentsnumeric_expressionIs an expression of the exact numeric or approximate numeric data type category, except for the bit data type.lengthIs the precision to which numeric_expression is to be rounded. length must be tinyint, smallint, or int. When length is a positive number, numeric_expression is rounded to the number of decimal places specified by length. When length is a negative number, numeric_expression is rounded on the left side of the decimal point, as specified by length.functionIs the type of operation to perform. function must be tinyint, smallint, or int. When function is omitted or has a value of 0 (default), numeric_expression is rounded. When a value other than 0 is specified, numeric_expression is truncated.Return TypesReturns the same type as numeric_expression.
#5 by vS
Юкос, а дробную? отнимать? :)
#6 by Юрикс
немного не то запостилFLOORReturns the largest integer less than or equal to the given numeric expression.Argumentsnumeric_expressionIs an expression of the exact numeric or approximate numeric data type category, except for the bit data type.Return TypesReturns the same type as numeric_expression.ExamplesThis example shows positive numeric, negative numeric, and currency values with the FLOOR function.SELECT FLOOR(123.45), FLOOR(-123.45), FLOOR($123.45)The result is the integer portion of the calculated value in the same data type as numeric_expression.
#7 by Юрикс
+6 надеюсь отрицательных чисел у тебя нет ага
#8 by aKomper
7 - Большое спасибо :)Скажи еще, где это взял, дабы не отвлекал я в следующий раз глупыми вопросами
#9 by Юрикс
о! можно еще такStatement Result 151.00
#10 by Юрикс
Books on Line - ставится при установке СКЛ или http://www.sql.ru/docs/mssql/tsql_ref/index.shtml
#11 by aKomper
10 - Спасиба
#12 by Юрикс
а чего ваяешь?
#13 by aKomper
12 - Делаю подобие органайзера. В качестве хранилища - справочник. Время напоминания храню как число. Вот делаю по нему запрос для вывода в форму органайзера, и было бы удобно мне сгруппировать события по времени - по часам и по минутам в разрезе часа. Еще пробный вариант творю, с 1С++ мало знаком пока.
Тэги:
Ответить:
Комментарии доступны только авторизированным пользователям

В этой группе 1С