Forum Replies Created

Viewing 15 posts - 226 through 240 (of 498 total)

  • RE: Need syntax help

    Frank,

    Now that I actually READ the error that was posted I see that your were correct in leaving the listeral out of the Group By Clause. Of course had I...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Its only giving me oneline for reply?

    Andy,

    I think this would be nice. Often I like to refer back to the previous posts when I'm replying. Now if I want to do that I open another window...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Joins vs More Columns

    I think Tom stated it best. Your design with the 3 tables allows you to have the situation where you need to add a new type of address or phone...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Tips for optimizing performance?? - VB/SQL Server

    Christy,

    What Sloan has said is good advice. In your case what you might do is take his approach and modify it slightly. Take the data that he suggests you put in...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Need syntax help

    Frank,

    I had written it that way at first and then I thought about the way that the join was being done in Access and changed it back to that join....




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Inserting Greek characters

    Can you post the script you used to call the SP?

     

    It should be something like

    EXEC yoursp N'Greekcharfield1', N'...etc...

    OR

    DECLARE @GreekField1 nvarchar(500)

    SET @GreekField1 = N'Greekdata'

    EXEC yoursp @GreekField1

     

    BTW: Rather than using...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: table var after fetch

    The FOR READ ONLY shouldn't make any difference. The way I have declared the cursor just makes it use a local variable rather than using a global cursor (I firmly...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Idnetity Insert

    What you will want to do is use DBCC CHECKIDENT... to reseed your identity column to the value you want after doing the "merge" of the two tables. The problem...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: table var after fetch

    chisholmd,

    I have never had a problem with it. Try the following and see if it works for you...

    SET NOCOUNT ON

    DECLARE  @tblVar TABLE(somefld int)

    DECLARE @iVal int

    DECLARE @c cursor

    INSERT INTO @tblVar...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Need syntax help

    I believe you should be able to use something like this....

    SELECT ITEM_H.ItemNo

        , INV_LVLS.MaxOH - Sum(IsNull(PID.PQty, 0)) AS QtyReq

        , "Rush - 4 Weeks" AS TimeFrame

    FROM (ITEM_H

            LEFT JOIN...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Create Database, with Parameter FilePath

    You will need to use dynamic sql for your create statement.

     

    DECLARE @sql nvarchar(4000)

    set @sql = 'CREATE DATABASE FOOBAR2.... FILENAME= ' + @dirMDF

    exec sp_executesql @sql




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Problem copying a database for testing purposes

    Just to clarify Allen's point the logical filename is what comes directly after the MOVE and before the = sign. You can either use the SP or you can go...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Debugger will not communicate

    Hmm... did you set up the service to run under your "Domain" account? If not I would try that.




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Is there a way to get the largest row size (in bytes) from a table?

    If you look in BOL at the topic "Estimating the Size of a Table" it will outline how to actually calculate the rowsize and table size. It also talks about...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Problem copying a database for testing purposes

    Henk,

    I think what you need is something like this...

    Backup your original DB.

    BACKUP DATABASE Northwind TO DISK = 'D:\Junk\Northwind_data.bak'

    Then run something like this...

    RESTORE DATABASE Northwind_Copy

    FROM DISK = 'D:\Junk\Northwind_data.bak'

    WITH MOVE 'Northwind' =...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

Viewing 15 posts - 226 through 240 (of 498 total)