Forum Replies Created

Viewing 15 posts - 1 through 15 (of 498 total)

  • RE: insert stored procedure not working

    I remember the feeling. Even if it was a LONG time ago. I actually feel that way right now with C# to some...




    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 help bulding a query in SQL server

    I'm sorry but this is WAY more complicated than you will want to do. IMHO. Joe was correct in what he said. You really need to think about the model....




    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: some questions for the post of DBA

    #1 SELECT SERVERPROPERTY('LicenseType'), SERVERPROPERTY('NumLicenses') should give you the License and Number of seats. SERVERPROPERTY also has other items of interest. I suggest you look it up.

    #2 Use the SP:StmtCompleted 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: insert stored procedure not working

    If you have SQL2K and have it running under a local user account rather than as Local System you should be able to step into your stored procedure. To do...




    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: Still need SP help

    In your code above the @PrimaryKeyValue variable will only accept the value from the SP call if you explicitly tell it that the parameter is an output parameter.

     

    CREATE PROCEDURE usp_FacilityAddress_Insert

      ...




    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: someone knows where is the information of the global tmep tables

    You might also think about using a UDF for this. That way you don't have to create a global table and anytime the parameters are the same you should get...




    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: Just discovered this but where is it documented so...

    I use COLLATE all the time as we use the Latin1_General_Bin collation as the default collation on our database. So if I need to compare case insensitive data I need...




    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: Max string length for exec command

    If you change this to use sp_ExecuteSQL you should no longer have a problem.

    declare @str1 varchar(8000),@str2 varchar(8000)

    exec sp_executesql @str1+@str2

     

    If you look up sp_executesql in SQL BOL you will notice...




    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: Systax help quotation marks driving me nuts

    Try

    declare @IDENT INT, @sql varchar(1000), @DBNAME VARCHAR(200)

    select @IDENT=min(dbid) from sysdatabases WHERE [dbid] > 0 AND name NOT IN ('PUBS',

    'NORTHWIND', 'TEMPDB', 'EStar', 'master', 'MAW_FE', 'MAWData', 'MAWOfficeSupply',

    'model', 'msdb', 'tempdb', '_MAWDataDev',...




    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: append data to a column by updating from a many-to-many table

    Sorry, I had written up a reply last night but I guess it didn't go through. Basically what I would do in this situation is to create a UDF 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: Upper Case Formula In Field Defination

    I'm pretty sure you can't do a self reference in the "Formula" for a field. This is due to the fact that "Formula" makes the field a computed column and...




    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: Reflecting changes in production Db onto staging DB

    Sylvain,

    That is the reason I stated that it ultimately depended on their business needs. It may be easiest to simply restore a database on the remote machine. Without knowing their...




    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: append data to a column by updating from a many-to-many table

    Why can't you do the concatenation during the initial insert?

    INSERT INTO test_show(uID, content)

    SELECT tm.uID, tm.content + tc.text

    FROM test_match tm

        JOIN test_cat tc ON tc.uID = tm.uID




    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: Reflecting changes in production Db onto staging DB

    While the software from Red-Gate will work I think an easier way would be to simply use a backup/restore scenario. Another way to do this would be to use Replication with...




    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: granting permissions on group of tables

    While the script above will do precisely what you asked it would be much better to create a database role and grant the permissions to that. Simply create the role...




    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 - 1 through 15 (of 498 total)