Viewing 15 posts - 421 through 435 (of 3,221 total)
If you want to create a table defining your quarters you could use:
CREATE TABLE #Quarters(QuarterStart DATETIME,QuarterEnd DATETIME,[Quarter] INT)
DECLARE @d DATETIME
DECLARE @Q INT,@C INT
SET @Q = 1
SET @C = 1
SET @d...
June 16, 2012 at 2:55 pm
In simple words yes it is. As an example:
SELECT [Id],[Col1], [Col2]
FROM [dbo].[QOD60] ORDER BY [Col2]
Results:
Id Col1 ...
June 16, 2012 at 11:13 am
Is this what you require? Post edited 4:13 PM
DECLARE @d DATETIME
DECLARE @Q INT
SET @Q = 1
SET @d = '04/01/2012'
SELECT @d as 'Quarter Start',@Q as 'Quarter',DATEADD(dd,-1,DATEADD(mm,3,@D))AS 'Quarter end date'
SET @Q =...
June 16, 2012 at 10:56 am
This is code by Jason Strate
http://sqlserverpedia.com/wiki/Find_Tables_Without_Primary_Keys
It should give you the result(s) you are seeking.
SELECT SCHEMA_NAME(o.schema_id) AS [schema]
,object_name(i.object_id ) AS
,p.rows
,user_seeks
,user_scans
,user_lookups
,user_updates
,last_user_seek
,last_user_scan
,last_user_lookup
FROM sys.indexes i
INNER JOIN sys.objects o ON i.object_id = o.object_id
INNER...
June 14, 2012 at 7:34 pm
Not the OP, but got this far and had to attend to other more important items, and I want to help the OP so posted what I had done, with...
June 14, 2012 at 1:36 pm
Hugo Kornelis (6/12/2012)
In case someone is wondering why the different data types have no effect - Ron included the...
June 12, 2012 at 2:33 am
May I suggest that you post the T-SQL statement that you think you might be using and then some one will be able to assist you further.
To post a...
June 8, 2012 at 5:56 pm
Have you considered assigning that user to the datareader role
db_datareader fixed database role can run a SELECT statement against any table or view in the database.
Check out this link...
June 8, 2012 at 5:50 pm
Check the IF EXISTS statement using Books On Line or GOOGLE, this may be what you are loooking for.
June 8, 2012 at 5:43 pm
Would have thought that the supporting documentation would have been
http://msdn.microsoft.com/en-us/library/ms189254
Above is, in my humble opinion a much stronger support for the correct answer.
June 7, 2012 at 6:52 am
Koen Verbeeck (6/4/2012)
Easy to answer actually, as the first answer never could be the correct one (2 and 3 contradict each other), so you only had to figure...
June 5, 2012 at 4:49 am
What recovery model are you using ... Simple or Full ..?
How often are you backing up the database?
June 3, 2012 at 8:32 am
Ah spoon feeding us on the basics ... I like that approach.
June 2, 2012 at 5:59 pm
EL Jerry (5/31/2012)
bitbucket-25253 (5/31/2012)
Cliff Jones (5/31/2012)
EL Jerry (5/31/2012)
Thank you for the question, Ron.I also got the right answers by elimination of the first 2 false statements.
"El" Jerry.
+1 but like Tom...
May 31, 2012 at 4:19 pm
Viewing 15 posts - 421 through 435 (of 3,221 total)