Forum Replies Created

Viewing 15 posts - 2,821 through 2,835 (of 3,221 total)

  • RE: Query to select records not present on a particular date between two given dates

    You would obtain better help if you followed the procedures recommended in the article in my signature block.

    Now assuming that the attendance table includes

    A row for each employee,...

    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: Adding today's date to the file name of a .CSV everyday

    Is this what you are searching for?

    SELECT REPLACE(CONVERT(VARCHAR(15), GETDATE(),101),'/','')

    For today this returns 09292008

    or this

    SELECT REPLACE(CONVERT(VARCHAR(15), GETDATE(),104),'.','')

    For today this returns 29092008

    or this (Thanks to Jeff Moden for reminding me of...

    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: UPDATESTATS Job

    This might help:

    FROM BOL for 2005

    http://msdn.microsoft.com/en-us/library/bb326281(SQL.90).aspx

    The SQL Server Database Engine cannot continue executing the query because it is trying to read data that was updated or deleted by another transaction....

    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: Drop extended property

    You can obtain a list of all defined extended properties by querying

    sys.extended_properties catalog view and insert that into a cursor as you seem to want to do. (Please...

    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 make application users SELECT/UPDATE on database only via Stored Proc

    I would recommend that you examine the use of an "Application Role". You can search SQL Server Central there has been a number of articles explaining it use....

    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: Output in excel file format

    You could use OPENROWSET in your T-SQL statement which would write your output to an Excel workbook

    An example is:

    INSERT INTO OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=D:\MSSQL\Test.xls', 'SELECT * FROM [Sheet1$]')

    SELECT * FROM...

    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: Convert datetime to just time (only hour)

    Try this:

    SELECT Hours, CAST(SUBSTRING(CAST(Hours AS VARCHAR(40)),CHARINDEX(':',Hours)-2,2) AS INT)

    AS 'Int Hours' FROM Table1

    Table1 contents as displayed in SSMS open table

    9/26/2008 4:46:20 PM

    9/26/2008 4:46:22 PM

    9/26/2008 4:46:24 PM

    9/26/2008 5:01:01 AM

    9/26/2008...

    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 tables referenced in stored procedures

    You might want to try:

    SELECT * FROM sys.sql_modules WHERE Definition LIKE '%tablename%' OR Definition LIKE '%tablename%'

    Now this could get to be tedious what with adding the OR clause so as...

    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: Database Health Report

    SQL Dba 808.

    I have used Excel to report similar information to management using graphs with a twist. I found managers not so interested in what the situation was last...

    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: rounding of decimals

    Remember what the definition of DECIMAL includes:

    Precision is the number of digits in a number.

    Scale is the number of digits to the right of the decimal point in 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: Documentation of Table Structure

    Have you tried using Information_Schema.table_constraints?

    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: Insert data from one table to another

    nithin

    This appears to be a rather under normalized design and my first suggestion would be to look at your design. The other 60 odd values if as you state...

    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: Prometheus

    In the dim distant past, having worked for a division of the Union Carbide Corp. (since gone belly up and sold) where at the end of your first year of...

    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: Convert(Datetime, '2008/09/18 23:59:59:999') == 2008-09-19 00:00:00.000

    mark

    But why say DateTime2 and not BigDateTime?

    Who truly knows. I find the collective mind of Microsoft to be somewhat like a split personality. Occasionally the Marketing...

    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: Convert(Datetime, '2008/09/18 23:59:59:999') == 2008-09-19 00:00:00.000

    mark.nijhof

    From BOL 2008 read the subject Datetime(Transact-SQL) I would say that Microsoft's developers have felt the same anguish (or puzzlement) about handling date and time data as you have expressed...

    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 - 2,821 through 2,835 (of 3,221 total)