Viewing 15 posts - 16 through 30 (of 345 total)
This will fix what you have:
Declare @loopYrbeg int
Declare @loopYrend int
Declare @tablename sysname
Declare @sql varchar(MAX)
Set @loopYrbeg = 2007
Set @sql = ''
begin
While @loopYrbeg < year( getdate() )
begin
Set @loopYrend = @loopYrbeg + 1
Set...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
January 25, 2013 at 8:04 am
sej2008 (1/22/2013)
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
January 22, 2013 at 7:11 am
smriti.subramanian (1/22/2013)
Table structure:create table A
id1 int,
status int
date created datetime
...
I tried running this in SSMS and it didn't parse. If only we had some valid DDL. Oh well...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
January 22, 2013 at 6:59 am
The "easiest to understand" type of solution is to build a temp table exactly like you want the output to look. Then have individual queries gather the pieces of information...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
January 21, 2013 at 2:39 pm
briancampbellmcad (1/14/2013)
Like this? (Still doesn't like near where the * is):...
WHERE Transaction_Type = 'Bulk Purchase' *
GO
Yes, like that but no asterix. You won't be using an *...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
January 14, 2013 at 1:56 pm
Lynn Pettis (12/26/2012)
Josh Ashwood (12/26/2012)
All hail Celko!!!!!:smooooth:
Please, do not encourage him! We want him to go haunt an Oracle site for a while.
Speak for yourself. You let him...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 27, 2012 at 7:07 am
Shadab Shah (12/21/2012)
Abu Dina (12/21/2012)
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 21, 2012 at 8:25 am
Jeff Moden (12/18/2012)
toddasd (12/18/2012)
Of course, I'd do this task like below. Be warned though, that I don't have to worry about sql injection in my closed environment.
Famous last words. ...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 19, 2012 at 7:27 am
Of course, I'd do this task like below. Be warned though, that I don't have to worry about sql injection in my closed environment.
CREATE PROCEDURE [dbo].[spDmValidationCheckTODD](
...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 18, 2012 at 3:22 pm
To make what you have work, take a look a this:
CREATE PROCEDURE [dbo].[spDmValidationCheck](
...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 18, 2012 at 2:50 pm
I can't see that what you need is more than this:
--Report 1
select Rank, Name, Board
from MyTable
sort by Rank, Name, Board
--Report 2
select Board, Name, Rank
from MyTable
sort by Board, Name, Rank
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 11, 2012 at 1:26 pm
Andre Ranieri (12/11/2012)
I considered this but we do have some late shift employees who modify the account database through the CRM UI while the sproc is being run in the...
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 11, 2012 at 10:49 am
You could have the SQL Agent job disable the triggers.
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 11, 2012 at 10:15 am
This is the first result from Google:
http://www.datasprings.com/resources/articles-information/creating-email-triggers-in-sql-server-2005
Seems to cover what you need.
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 6, 2012 at 9:12 am
briancampbellmcad (12/6/2012)
Your above code recommendation works perfectly... thank you for sharing! - Brian
So did this one http://www.sqlservercentral.com/Forums/FindPost1393195.aspx
But I understand the attraction Lowell's avatar brings. 😎
______________________________________________________________________________
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
December 6, 2012 at 8:18 am
Viewing 15 posts - 16 through 30 (of 345 total)