Forum Replies Created

Viewing 15 posts - 76 through 90 (of 211 total)

  • RE: Linked Server connection issues

    Thanks for your help but it seems like we have a name resolution issue. If I create the linked server named "BETADB" instead of the actual db server name, RPBETADB81,...

  • RE: Calculating Percentage

    This work?

    SELECT s1.EmpId, s1.Division, s1.Department, SUM(s1.Salary), SUM(s1.Salary)/s2.Salary

    FROM SomeTable s1

    INNER JOIN (SELECT EmpId, SUM(Salary) AS Salary FROM SomeTable GROUP BY EmpId) s2

    ON s1.EmpId = s2.EmpId

    GROUP BY s1.EmpId, s1.Division, s1.Department, s2.Salary

  • RE: Linked Server connection issues

    Thanks for the responses.

    colin.Leversuch-Roberts (5/11/2011)


    I usually use the sqloledb provider and @srvproduct ='', other than that I can't see anything different in your scripts to mine.

    Oh I link by ip...

  • RE: Proper referential integrity

    Sorry, kicked it out there thinking this was new development work.

    In the past I've had to do something similar using a JOIN table containing a generic ID plus an identifier...

  • RE: Proper referential integrity

    Maybe a sequence table? You'd then FK all your other tables back to it.

    http://www.mssqltips.com/tip.asp?tip=1293

  • RE: What is maximum Rowversion value in SQL server

    For change control purposes, we usually convert these values to BIGINTs. Easier to pass back and forth from middle tier.

  • RE: Want to do career in DBA

    Grant Fritchey (4/8/2011)


    Just so you know, certification is unlikely to help you get hired or get started in a DBA job. In general, you're better off working your way in...

  • RE: Length

    Fitting end to the week: I know I got the right answer but never fail, there is somebody telling me I got it wrong.

  • RE: Error

    Tara-1044200 (4/7/2011)


    ...i have no problem querying other databases on the same server.

    Sure the linked server credentials have access to the db in question?

  • RE: sql complains about the hyphen in the server name.

    Don't have a lot to go off here but I'd double check to make sure the employee table is in the dbo schema.

  • RE: Data Modeling with Visio -- is it worth it?

    I agree with Grant about using Visio to do modeling. They had a much better product (for modeling) before MS acquired them.

    I'd recommend Quest's Toad Data Modeler. Nice reverse and...

  • RE: Help on joining tables, weird results

    Leaving the time off defaults it to midnight (i.e. '2011-3-1' = '2011-03-01 00:00:00.000').

    Syntax looks ok. Noticed that you are returning a different date field in the select then you're filtering...

  • RE: One to Many select statement to be returned as one row of data

    You could do multiple joins to the address detail table based on address type, something like this:

    SELECT c.CustomerID,c.RegisterDate, c.Email, c.FirstName, c.LastName, c.Phone,

    c.AffiliateID, c.Referrer, c.OkToEmail, c.BillingEqualsShipping, c.BillingAddressID, c.ShippingAddressID,

    c.CreatedOn, c.VATSetting, c.VATRegistrationID, c.Active,

    a1.Company,...

  • RE: User read access to an archived database

    I'd wait for a maint window then make the DB read/write, add the user and then reset to read-only.

    USE [master]

    GO

    ALTER DATABASE [SomeDB] SET READ_WRITE WITH NO_WAIT

    GO

    CREATE USER [SomeUser] FOR LOGIN...

Viewing 15 posts - 76 through 90 (of 211 total)