Viewing 15 posts - 3,511 through 3,525 (of 8,731 total)
Keeping the nulls resulting from the MAX will help you to get the correct format using ISNULL()
SELECT t1.ParentID,
t1.TaskID,
ISNULL( MAX( CASE WHEN ParentID...
January 21, 2016 at 7:50 am
PSB (1/21/2016)
I am...
January 21, 2016 at 7:14 am
I forgot to come back to mention that problem that might occur. It's easy to fix it. Remember that this is only for displaying purposes as there's no real order...
January 20, 2016 at 4:52 pm
Siten0308 (1/20/2016)
not sure if anyone encountered this before, but I have a custom table made for me (sadly they didnt ask for my input), the structure is like this
everything is...
January 20, 2016 at 2:02 pm
I usually avoid using those kind of styles. When possible, keep dates as dates. Otherwise, use ISO 8601 formats which are not language dependent.
For date only use YYYYMMDD
For date and...
January 20, 2016 at 1:32 pm
Phil Parkin (1/20/2016)
Eirikur Eiriksson (1/20/2016)
Grant Fritchey (1/20/2016)
January 20, 2016 at 11:58 am
Steve Jones - SSC Editor (1/20/2016)
January 20, 2016 at 10:45 am
Just an advice, this should perform better than the UNION ALL approach and give the same results.
set @query = 'SELECT EmployeeID
,AttType
,' + @cols + '
from
(
selectEmployeeID
,AttType
,AttTime
,AttendanceDate...
January 20, 2016 at 10:10 am
They don't work equally.
The first one uses a binary collation which is the fastest as it will just compare equal bytes.
The second one is Case Sensitive (CS) and Accent Insensitive...
January 20, 2016 at 9:42 am
PSB (1/20/2016)
Thanks. That worked.
Great! Do you understand it?
January 20, 2016 at 8:45 am
You just define the collation the same way.
These are examples and shouldn't be used as real filters.
CREATE TABLE tableA(description varchar(100));
INSERT INTO tableA
VALUES( 'Unknown'),( 'UNKNOWN'),( 'unknown'),( 'Unknówn');
Select *
FROM tableA
where...
January 20, 2016 at 8:44 am
You really need to understand how the code works before implementing it. STUFF won't concatenate anything, it'll just exchange strings. There are plenty of articles that explain how this concatenation...
January 20, 2016 at 7:07 am
Rodan (1/19/2016)
So if Trump is elected in the US – do you think we have to worry about him putting up fences around our foreign keys? :w00t:
I'll worry when he...
January 19, 2016 at 2:16 pm
If you're trying to get cross-database references, maybe you can change these options (I'm not sure if they're available in 2005)
SELECT referenced_server_name
,referenced_database_name
,referenced_schema_name
...
January 19, 2016 at 12:50 pm
You have your logic inverted
SELECT OBJECT_NAME(referenced_major_id) AS referenced_object_name
,COALESCE(COL_NAME(referenced_major_id, referenced_minor_id), '(n/a)') AS referenced_column_name
,*
FROM sys.sql_dependencies
WHERE object_id = OBJECT_ID('YourStoredProcedureNameAndSchema')
ORDER BY referenced_object_name, referenced_column_name;
January 19, 2016 at 11:49 am
Viewing 15 posts - 3,511 through 3,525 (of 8,731 total)