Viewing 15 posts - 31 through 45 (of 45 total)
how would I use this if I wanted to use the following:
declare @count int
set @count = ?
if @count>=1
Jack Corbett (7/29/2008)
July 29, 2008 at 12:00 pm
great, that's really useful to know.
Thanks.
Jack Corbett (7/29/2008)
You can immediately follow your first query with Select @@ROWCOUNT which returns the # of rows returned by the previous statement.
July 29, 2008 at 10:46 am
Interesting... do you have any good tutorials that have helped you with this?
GSquared (7/25/2008)
Personally, I've found attaching the query results pretty useless....
July 25, 2008 at 12:36 pm
very true 🙂
Jason Selburg (6/16/2008)
No questions are stupid, they're just sometimes "untimely" as in the answer comes to you right after you ask it.
June 16, 2008 at 9:06 am
that was a stupid question. Thanks for your help.
Jason Selburg (6/16/2008)
adam (6/16/2008)
Thanks. I would like to actually convert these permanently to upper case.Carolyn Richardson (6/16/2008)
Try SELECT UPPER('John Doe')
UPDATE...
June 16, 2008 at 9:01 am
Thanks. I would like to actually convert these permanently to upper case.
Carolyn Richardson (6/16/2008)
Try SELECT UPPER('John Doe')
June 16, 2008 at 8:56 am
thanks
ahutch (6/4/2008)
I'm no TSQL expert, so someone could probably right a much better script than I could, but you want to look into joining these two tables:[msdb].[dbo].[sysjobhistory]
[msdb].[dbo].[sysjobs]
June 4, 2008 at 12:23 pm
great! the tab between the ' ' works perfectly.
I had long since given up on this thread. Thanks for the solution.
Adam.
Ted Walsh (5/27/2008)
May 27, 2008 at 1:10 pm
Thank you.
I don't know too much about variables.
set @zip = (select zipcode from DEMOG) does not work because there is more than one result.
How would I go about updating all...
May 19, 2008 at 9:15 am
Jason Shadonix (2/29/2008)
Have you tried playing with the @query_result_separator? Perhaps make it a space or comma instead of an empty string?
I have, and the data rows are still squashed...
February 29, 2008 at 3:01 pm
Jack Corbett (2/29/2008)
I would use...
February 29, 2008 at 3:00 pm
Matt Miller (2/26/2008)
Select user, datepart(yyyy,datein) as Yr,
sum(case when datepart(mm,datein) =1 then 1 else 0 end)...
February 26, 2008 at 11:01 am
Matt Miller (2/25/2008)
Select user,
datepart(yyyy,datein)*100+datepart(mm,datein) as yearmonth,
count(datein) as LoginCount
from login
WHERE
...
February 26, 2008 at 6:55 am
Matt Miller (2/25/2008)
Are you trying to get a count by month by user? or do you just want a count by user for the period?
Yes, count by month by...
February 25, 2008 at 9:05 am
Viewing 15 posts - 31 through 45 (of 45 total)