Viewing 15 posts - 211 through 225 (of 399 total)
I see what you're saying. I tried it with the below example, and it returned 1 for placevalue of first tab.
DECLARE @REALNAME varchar(255)
SET @REALNAME = 'Ricki Ricardo'--where the leading space...
October 21, 2013 at 4:13 pm
ach, sorry, I meant leading white spaces. NOT zeroes.
like this:
/****** Script for SelectTopNRows command from SSMS ******/
DECLARE @REALNAME varchar(255)
SET @REALNAME = ' Ricki Ricardo'
select LEN(@realname)
select len(RTRIM(ltrim(@realname)))
in this...
October 21, 2013 at 3:43 pm
OK, coincidence that my last query should have been a SELECT INTO.
Yes, Bhuvnesh, I think restarting SQL Server should have reset the numbers for SPID 54. Besides, I wasn't...
October 13, 2013 at 10:29 am
GilaMonster (10/11/2013)
How are you identifying that the session 54 (which is your current session that you're running the sp_who from) is locking resources and preventing updates?
I'm concluding that session 54...
October 12, 2013 at 6:31 pm
Chris/anyone, will you kindly explain to me the factors that require one to use CROSS APPLY for the above 3 queries of the CTE?
October 9, 2013 at 4:29 pm
I am making a permanent table. But I need the datetime without the zeros on end.
just
2009-10-20 21:45
not
2009-10-20 21:45:00.000
October 7, 2013 at 6:02 pm
for bonus bonus, can you show me how to get just the date and minutes? eg. 2011-10-20 21:45
October 7, 2013 at 5:31 pm
well, this gives me a table with one row containing two values:
2011-10-07 16:11:56.3432023-10-04 16:14:56.343
I changed to Select *.
Thanks for the answer with the bonus mini - puzzle Luis. I...
October 7, 2013 at 5:15 pm
Alan and Lutz, very glad for reply. Thank you for showing me syntax that'll do the job. I will work on this tonight.
October 7, 2013 at 3:02 pm
Chris. It's Magic.
I have a lot to learn about OUTER and CROSS APPLY.
October 4, 2013 at 7:57 am
When I join to the Dates table, I am now successful in creating placeholders for those dates missing. The values for all the columns from the CannedBackupJobs table are...
October 3, 2013 at 8:15 am
Thanks Scott, and everyone for replies & link.
October 2, 2013 at 11:26 am
YIKES, I see the error. The where should be d.d>=
and not dbj.starttime >=
This works:
select * from cannedbackupjobs dbj
full outer join _dates d on d.d = CONVERT(VARCHAR(10), dbj.starttime, 120)
where d.d...
October 2, 2013 at 7:46 am
OK. I've got a dates table using.
CREATE TABLE _Dates (
d DATE,
PRIMARY KEY (d)
)
DECLARE @dIncr DATE = '2000-01-01'
DECLARE @dEnd DATE = '2100-01-01'
WHILE ( @dIncr < @dEnd )
BEGIN
...
October 2, 2013 at 7:30 am
Viewing 15 posts - 211 through 225 (of 399 total)