Forum Replies Created

Viewing 15 posts - 421 through 435 (of 3,221 total)

  • RE: calculating quarter

    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...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: SELECT - with ORDER BY - but field not in SELECT list

    In simple words yes it is. As an example:

    SELECT [Id],[Col1], [Col2]

    FROM [dbo].[QOD60] ORDER BY [Col2]

    Results:

    Id Col1 ...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: calculating quarter

    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 =...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: Find all tables without a Primary Key

    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...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: looping through dates in a table

    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...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: INTERSECT 1

    Hugo Kornelis (6/12/2012)


    Thanks for the question, Ron. And thanks Koen for the extra link.

    In case someone is wondering why the different data types have no effect - Ron included the...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: DOES IT EXIST???

    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...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: Read-Only Access to a DB

    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...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: DOES IT EXIST???

    Check the IF EXISTS statement using Books On Line or GOOGLE, this may be what you are loooking for.

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: XQuery string functions

    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.

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: SQL 2012 BOL

    Koen Verbeeck (6/4/2012)


    Nice one, thanks.

    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...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: How to decrease Log file size?

    What recovery model are you using ... Simple or Full ..?

    How often are you backing up the database?

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: SSIS 2012 - Versioning

    Ah spoon feeding us on the basics ... I like that approach.

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: SQL Server Logs

    Koen Verbeeck (6/1/2012)


    Lucky guess for me 🙂

    +1

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: Resource Database

    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...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

Viewing 15 posts - 421 through 435 (of 3,221 total)