Viewing 15 posts - 10,381 through 10,395 (of 26,489 total)
joshphillips7145 (7/30/2012)
sysobjects.Name
, sysindexes.Rows
FROM
sysobjects
INNER JOIN sysindexes
ON sysobjects.id = sysindexes.id
WHERE
...
July 30, 2012 at 4:24 pm
Steve Jones - SSC Editor (7/30/2012)
Hmmm, I go to SQL Saturday #144 and this thread goes from water cooler to technical discussion.Nice to see you all playing relatively nicely.
That's just...
July 30, 2012 at 4:02 pm
It isn't sleep (or lack there of). It was simple inattention to your original query that confused me. I may have been comparing apples and oranges but I...
July 30, 2012 at 4:00 pm
joshphillips7145 (7/30/2012)
Select Top 1 tab.nameFrom sys.tables tab
Order By name Asc;
how about this?
Be sure to use the table alias in the order by clause as well:
Select Top 1
...
July 30, 2012 at 3:43 pm
joshphillips7145 (7/30/2012)
Like this?Select Sys.tables.name
From sys.tables
Order By name Asc
Yes, this works.
First recommendation, stay away from 3 (and 4) part naming in your select list. This is actually being depreciated...
July 30, 2012 at 3:18 pm
Show us the query you would use to return the list of tables from sys.tables in alphabetical order.
July 30, 2012 at 3:09 pm
Luis Cazares (7/30/2012)
Am I missing something? Have you slept well...
July 30, 2012 at 3:06 pm
This:
LEN(REVERSE(@FilePath2)) [LenRevrs2] = 36
datalength(RevFilePath2) = 72
The variable @FilePath2 is declared NVARCHAR(100), yet it says it only uses 36 bytes when reversed. That same string written to a table, and...
July 30, 2012 at 3:03 pm
Going slightly off-topic, you may also want to rewrite your function as an itvf and use it with CROSS APPLY in your FROM clause instead of using the scalar function...
July 30, 2012 at 2:55 pm
Teach me to use cntl-Z to remove temporary changes:
DECLARE @FilePath VARCHAR(100),
@FilePath2 NVARCHAR(100)
SET @FilePath = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ '
SET @FilePath2 = N'ABCDEFGHIJKLMNOPQRSTUVWXYZ ...
July 30, 2012 at 2:33 pm
Hang on, copied the wrong code above.
July 30, 2012 at 2:30 pm
Luis Cazares (7/30/2012)
ColdCoffee (7/30/2012)
sestell1 (7/30/2012)
LEN(Reverse(<string>) is a quick and dirty way to find the length of a string INCLUDING trailing whitespace.
Instead, you can use DATALENGTH function to get the length,...
July 30, 2012 at 2:28 pm
magarity kerns (7/30/2012)
July 30, 2012 at 2:07 pm
Could be they are physically moving servers from one location to another and don't want SQL Server coming up when they do the initially testing of the servers on power...
July 30, 2012 at 1:44 pm
SQLRNNR (7/30/2012)
SGT_squeequal (7/30/2012)
Never expect anyone...
July 30, 2012 at 11:58 am
Viewing 15 posts - 10,381 through 10,395 (of 26,489 total)