Viewing 15 posts - 5,701 through 5,715 (of 7,608 total)
If you can live with only a three-char month, you can remove the STUFF() function. If you need to have the full month name, you'll need the STUFF() part...
October 16, 2014 at 12:34 pm
I admit, I name all constraints myself, including DEFAULTs, even though for DEFAULTs that may be deprecated.
CREATE TABLE Theory (
Id int identity(1,1) CONSTRAINT Theory__PK primary key,
Data varchar(20),
LogDate datetime CONSTRAINT Theory__DF_LogDate...
October 16, 2014 at 12:21 pm
Do you have some type of id or other unique/key value on the row?
October 15, 2014 at 12:56 pm
I agree with others, particularly on ISNULL(). In fact, there's a simple, very easy to remember rule:
NEVER use ISNULL() in a WHERE or JOIN clause.
If, as is typical, the...
October 15, 2014 at 11:11 am
You could even DROP and (re)CREATE the procedure as long as you re-added the extended procedure with the version number after the CREATE.
October 15, 2014 at 11:01 am
Staggerlee (10/14/2014)
Is there a way via T-SQL to check or read information from a stored procedure? Ie, could I add a comment with a build number in it?
I suggest...
October 14, 2014 at 3:12 pm
I suggest a different method to avoid 2 or more decimal points:
AND CASE
...
October 14, 2014 at 3:09 pm
Jeff Moden (10/14/2014)
It'll be interesting when an actual vendor name also contains dashes. 😛
In that case, presumably we would search first for a digit only, "%0-9%", then do the search...
October 14, 2014 at 8:14 am
SELECT Fulltext, Contract2,
Substring(Contract2, Contract3_Start, Contract3_Length) AS Contract3
FROM (
SELECT Fulltext From [Sonae].[dbo].[Images_Local]
) AS test_data
cross apply (
SELECT Substring(FullText, PATINDEX('%Contrato%',FullText), 50) as Contract2
) as...
October 13, 2014 at 3:45 pm
SELECT Fulltext, Contract2,
Substring(Contract2, Contract3_Start, Contract3_Length) AS Contract3
FROM (
SELECT 'Contrato Promocional 2010-241772 Descrico CDR TD' AS Fulltext UNION ALL
...
October 13, 2014 at 10:59 am
CELKO (10/10/2014)
Identity is as good, convenient, practical way of assigning something like a sequential Order#.
No it is not; we have the ANSI/ISO Standard CREATE SEQUENCE now....
October 13, 2014 at 8:54 am
CELKO (10/10/2014)
Again, who the hell has used tape for anything but backups in 20 years?! At least join the 1990s if you can't all the way to 2014!
...
October 10, 2014 at 1:40 pm
CELKO (10/10/2014)
Finally, we use lowercase for data types, because in SQL Server type names are case sensitive in many contexts. We do not want to cause unexpected future errors...
October 10, 2014 at 1:35 pm
CELKO (10/9/2014)
A competent professional in any trade would do it right without any special effort. Does a doctor think about stitches, or does he just do them? He would also...
October 9, 2014 at 6:52 pm
CELKO (10/9/2014)
1. You have many ISO-11179 violations. Do you have only one Employee, as you said? The correct name is “Personnel”; an abstract set of elements.
2. A procedure is...
October 9, 2014 at 1:05 pm
Viewing 15 posts - 5,701 through 5,715 (of 7,608 total)