Viewing 15 posts - 3,301 through 3,315 (of 59,086 total)
The FORMAT function return type is NVARCHAR , which is a string.
https://docs.microsoft.com/en-us/sql/t-sql/functions/format-transact-sql?view=sql-server-ver16
You can get the same result by replacing FORMAT with
CONVERT(varchar(10), [YourDateField], 120)
Again, though, if you...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 22, 2022 at 5:11 pm
Hi hakiyu. Glad to "meet" you and welcome aboard.
Since you have asked such a open-ended question, I can only respond with an open-ended answer. It IS possible that you might...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 22, 2022 at 4:34 am
Hello friends,
I have a requirement where I have to compare the two fields using regular expressions.
Example, I have a parameter with value 'ABCDEF.%30a.3%a' or 'BBBB.%10a.5%a' where %30a or %10a...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 22, 2022 at 4:04 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 the...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 22, 2022 at 3:31 am
There's different school of thoughts over whether the identity column should be a candidate of clustered index or not (mostly in favour of having it as clustered index).
What's your...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 22, 2022 at 2:58 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 the...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 21, 2022 at 9:24 pm
@Johan ... Do you have the code where you created and populated the #TallyDate table so that newbies can run your test?
Also, your good code doesn't need the DATEADD/DATEDIFF thing. ...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 21, 2022 at 9:12 pm
In addition to what Jeff Moden has outlined - take a look at the BUFFERCOUNT and MAXTRANSFERSIZE parameters for both backup and restore. Adjusting those values can improve performance...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 21, 2022 at 9:08 pm
I would strongly recommend sticking with "integer" as the type. Add a domain (or range_of_values) property to limit the size rather than a data type name. Remember, the logical...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 21, 2022 at 8:57 pm
I'm doing some more checking but, just to be on the safe side, I added a warning to the flower box on the function I posted.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2022 at 11:47 pm
I have 10 text files and file 4 at nth row has special character that cant be loaded to sql server table
required is to log the issue
AND
ignore processing the...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2022 at 6:53 pm
All that's nice but no one has identified how to identify duplicate entries for the various ticket responses possible for a given ticket number or prevent them. Or is "no...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2022 at 6:19 pm
And, just to make you feel better about abandoning FORMAT, I've not yet seen it where it's not at least 20 times slower than code like what Frederico suggested even...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2022 at 3:42 pm
Hi,
I'm looking for a third-party backup and restoration solution because native restore takes roughly 7 hours for a 4TB database.
Some of the object restore solutions really do a full...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2022 at 3:13 pm
I'll also add that a lot of very well intentioned folks rail against the use of stored procedures because they "not portable". What they mean by that is that a...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2022 at 3:01 pm
Viewing 15 posts - 3,301 through 3,315 (of 59,086 total)