Forum Replies Created

Viewing 15 posts - 1,921 through 1,935 (of 3,233 total)

  • RE: back up

    Look up 'backing up databases' in books online. You can either run the BACKUP DATABASE statement, or use the Management Studios GUI by right-clicking on the DB and going...

  • RE: Query Question - Need to list accounts with only 1 contact

    No problem. The key to this one is the derived table. If you're not real familiar with derived tables, I suggest searching SSC and reading up on them. There's also...

  • RE: Right join

    No problem. The key to this one is the derived table. If you're not real familiar with derived tables, I suggest searching SSC and reading up on them....

  • RE: Right join

    Here you go......

    DECLARE @ItemTypes TABLE (ItemTypeID int, ItemTypeName varchar(10))

    INSERT INTO @ItemTypes

    SELECT 1, 'One' UNION ALL

    SELECT 2, 'Two' UNION ALL

    SELECT 3, 'Three'

    DECLARE @sales TABLE (ItemTypeID int, SaleID int IDENTITY(1,1))

    INSERT INTO @sales...

  • RE: Creating a trigger to run inside a SP

    I'm not real clear on what you are asking for here. It sounds to me like you want to run a nested stored procedure call to the second stored...

  • RE: Query Question - Need to list accounts with only 1 contact

    This approach should work. Keep in mind that from your description, I have no idea what your table DDL looks like. This is a wild stab in the...

  • RE: Return Ranked Results?

    This should work for you.

    DECLARE @TableVar TABLE (MyDate datetime, Col2 varchar(10))

    INSERT INTO @TableVar

    SELECT '2008-02-01 10:00AM','ASX1' UNION ALL

    SELECT '2008-02-01 10:30AM','ASX1' UNION ALL

    SELECT '2008-02-02 10:00AM','ASX1' UNION ALL

    SELECT '2008-02-02 10:30AM','ASX1' UNION ALL

    SELECT...

  • RE: Need help with Partially complete query.

    Limiting the subqueries on event_id won't help. The problem with the subqueries is that they return results for all people_code_ids. The subqueries need to be correlated back to...

  • RE: Is GROUPING() the way?

    Of course, if you want to do it in SQL Server 2000, there's still a way. This may not be the cleanest way to get there, but it works...

  • RE: Need help with Partially complete query.

    You are getting that error because the sub queries in your SELECT are returning more than one value. SQL Server will not allow obviously not allow this for good...

  • RE: Is GROUPING() the way?

    Chad's solution will only work on SQL Server 2005 and this appears to be a 2000 forum. Chris, which versio of SQL Server are you using?

    Also, the...

  • RE: Convert getdate() to Varchar

    TJK,

    You may already know this, but I think it needs said anyway. This is one of the many reasons why you don't stored datetime information in varchar columns.

  • RE: Convert getdate() to Varchar

    Please don't cross post.

    Continue this thread here:

    http://www.sqlservercentral.com/Forums/Topic452328-338-1.aspx

  • RE: Converting Getdate() To Varchar

    SELECT LEFT(REPLACE(REPLACE(REPLACE(REPLACE(CONVERT(varchar,GETDATE(), 121),'-',''),':',''),'.',''),' ',''),16)

  • RE: New to SQL SERVER DEVELOPMENT

    I think it would help if we had a little better explanation of why you are doing what you are doing? What is the end purpose that you are...

Viewing 15 posts - 1,921 through 1,935 (of 3,233 total)