Viewing 15 posts - 61 through 75 (of 83 total)
ar-727381 (9/29/2009)
its still not formatted.@query = 'select top 2 customerid, contactname, city from customers'
I know, sorry about that (see my Edit in my original response). How about:
@query = 'select...
September 29, 2009 at 1:28 pm
You may want to play around with the following (from BOL):
[ @body_format = ] 'body_format'
Is the format of the message body. The parameter is of type varchar(20), with a default...
September 29, 2009 at 1:11 pm
Hmmm....okay. Do you have any other examples (the integer numbers and the dates they correspond to)?
MJM
September 29, 2009 at 12:55 pm
Question - what does 519810000000 represent? In other words, how do you know what the correct answer is in terms of that datetime you have in your question?
Is that...
September 29, 2009 at 12:38 pm
This code will comma-delimit all locations and take NULLS into account (changing them into zero-length strings). The outer query takes the concatenated string, and trims off the trailing ',...
September 29, 2009 at 8:46 am
If you take the 4 minutes to put the column names in there (insert and select statements), this wouldn't happen. Even if columns changed.
you might be missing data from new...
September 29, 2009 at 8:35 am
I agree with RBarryYoung, read the article (that's what I am going to do now, in fact). My recommendation came from my specific problem, and although it solved my...
September 28, 2009 at 3:55 pm
I would look at the PIVOT/UNPIVOT functions in BOL, also you can use CASE statements to return the data you're wanting in a specific column position.
MJM
September 28, 2009 at 3:53 pm
Wow, there are several of these issues today seemingly! Here's the reply I sent to another person just a little while ago (I'll add a link to that thread...
September 28, 2009 at 3:49 pm
Scozzard (9/28/2009)
is there a better way?Thanks
Scott
Probably, but I can't think of one. Tempdb is not distinguishable from any other of the system databases, at least in the query MS...
September 28, 2009 at 3:45 pm
Seconded ^^. If a comma is truly your delimiter then yes, it can be done by substringing the CHARINDEX position of the delimiter.
DECLARE @Names TABLE(
FullName VARCHAR(255)
)
INSERT INTO @Names(FullName) VALUES('Astohn,...
September 28, 2009 at 3:41 pm
Similarly, this would also do what you need, I think:
SELECT * FROM(
SELECT
member_id,
subscribers,
date_submitted,
RANK() OVER (PARTITION BY member_id, subscribers ORDER BY date_submitted DESC)...
September 28, 2009 at 3:34 pm
AVB (9/28/2009)
September 28, 2009 at 3:19 pm
Ralf Dietrich (6/21/2009)
why did you prefer custom maintenance plans over custom SQL scripts? (Yes it is a very interesting solution you showed up! - thx!)
I've seen so many bugs...
June 29, 2009 at 2:02 pm
***************
For everyone's convenience, the SQL scripts and documentation is attached to this post.
***************
Please let me know if you have any questions.
Thank you!
Mark
June 16, 2009 at 8:42 am
Viewing 15 posts - 61 through 75 (of 83 total)