Viewing 15 posts - 361 through 375 (of 683 total)
> Query Analyzer only outputs 256 characters
Not necessarily. Try changing the setting in 'Tools -> Options -> Results -> Maximum characters per column'. Maximum setting is 8192.
Maybe that will give you...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
>> Books Online states that SMALLDATETIME is only accurate to the minute.
Yep. That's why they will often have the same value for callreceived. And why you can't then really tell which...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
How do you identify the "most recent" call if they have the same value for callreceived?
Perhaps you would be better using datetime datatype, rather than smalldatetime?
You can use "top 1" (as...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Peso - Really?
You can use OPENROWSET to add 2 rows to the top of an Excel sheet which already has data in it and add the date there? Really?
(I hope you're...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
To do exactly this, I think you need to use OLE Automation. You can read about that in BOL, or here:
http://www.databasejournal.com/features/mssql/article.php/1442201
I think Excel will need to be installed on your...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
So the xls file already exists, and you want to add a couple of rows (rows 1 and 2, say) to it and put the date in row 1? And you...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
This looks like a dynamic pivot table request, and I suggest you refer these articles:
http://www.sqlteam.com/item.asp?ItemID=2955
http://weblogs.sqlteam.com/jeffs/archive/2005/05/02/4842.aspx
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Amit - that returns "Jul 5 2" for me.
fred - one of these will get the date in the format you need.
select convert(varchar, getdate(), 101) as created...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Or...
create table #output (name sysname, sysname, access bit)
exec sp_MSforeachdb @command1 =
'insert #output select ''?'', name, hasdbaccess from ?.dbo.sysusers where name in (''guest'', ''public'')'
select * from...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
The other link I posted said: "Drop it in the too hard basket - I'm going to do it another way....". You might, therefore, both be out of luck!
I recall...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
A simple tally table and a cross join will save you a while loop / repetitive coding / typing. Here's one quick implementation as an example... ![]()
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Or maybe something like this?
--data
declare @t table (col1 varchar(1), col2 int, col3 int, col4 int, col5 int)
insert @t (col1, col2)
select 'A', 1
union all select 'B',...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Viewing 15 posts - 361 through 375 (of 683 total)