Viewing 15 posts - 1 through 15 (of 24 total)
Syntax like FORMAT(tab1.g, 'yyyy-MM-dd')
suggests that you are "rounding" a date and time value to just the date; you would therefore be much better off just casting/converting the value...
June 27, 2022 at 8:00 am
June 27, 2022 at 7:48 am
Q: Sorry, but I'm not seeing it. How would such a thing be used to improve the performance of the query the OP posted?
Valid point, chances are good...
June 27, 2022 at 7:27 am
My goal was to help present dates in form "YYMM". Existing functions such as Convert and Format apparently are tricky to use to achieve requested format.
FORMAT is...
June 27, 2022 at 7:17 am
What is the data type of "tab1.g, h, i, j, k, l?
If it is a datetime, then CONVERT(date, tab1.g) is all you might need, depending upon the regional setting...
June 27, 2022 at 7:14 am
Hi all,
I have been using FORMAT()
FORMAT(Tab.date, 'yyyy-MM-dd') AS 'date_begin',
but been told it would be slow when it comes to BIG QUERIES.
How can I...
June 27, 2022 at 7:06 am
Hi all,
I have been using FORMAT()
FORMAT(Tab.date, 'yyyy-MM-dd') AS 'date_begin',
but been told it would be slow when it comes to BIG QUERIES.
How can I still want...
June 22, 2022 at 6:49 am
replacement for format to return just yyyy-mm-dd (or yyyy-mm) is easy - convert(char(10), datefield, 121) - change the char(10) to char(7) to return just yyyy-mm - but as...
June 20, 2022 at 1:08 pm
2020-11 is not a date. 202011 as an INT is, however, easy enough.
You say that you don't want to return a string, but that is exactly what FORMAT returns,...
June 20, 2022 at 1:07 pm
June 20, 2022 at 1:06 pm
You want to look at date functions like EOMONTH. Here are some samples that are pretty much what you're looking for.
Thanks for the link
June 17, 2022 at 6:42 am
TO_CHAR(trunc(Sysdate,'MM')-1,'MMYYYY')) - this is returning the first day of the current month (trunc(sysdate, 'MM) minus 1 day (-1) in format MMYYYY
so basically the code is returning all rows where...
June 17, 2022 at 6:41 am
TO_CHAR(trunc(Sysdate,'MM')-1,'MMYYYY')) - this is returning the first day of the current month (trunc(sysdate, 'MM) minus 1 day (-1) in format MMYYYY
so basically the code is returning all rows where...
June 17, 2022 at 6:40 am
when I try your hardcoded logic I get 0 for X and 100 for y
select 25/40 *100
select 100 - ((25/40)*100)
Based on your logic...
May 6, 2022 at 7:16 am
What is the datatype of the column 'status_count'?
We have assumed that it is an integer, but I suspect that it is not.
varchar cause there are letter in...
May 5, 2022 at 11:35 am
Viewing 15 posts - 1 through 15 (of 24 total)