Forum Replies Created

Viewing 15 posts - 6,961 through 6,975 (of 7,185 total)

  • RE: Need script to split a column fullname to first & last name

    Brian

    It depends on the format your full names are in.  Is it "Lastname, Firstname" or "Firstname Lastname"?  Are titles and/or middle names included in the full names?  How will you...

  • RE: work around for inserting into table with unique constraint.

    Yes, you can use a staging table, but you'll still have to deal with the duplicates in your data at some point.

    John

  • RE: INSERT INTO and SELECT statement..pls help

    I'm guessing that the connection your UserControl uses and the connection you use to execute the INSERT INTO statement have different values for QUOTED_IDENTIFIER.  Have a look at the SET...

  • RE: Prima inter pares?

    And there are still users in the database that you can't delete because it says they own objects?

    John

  • RE: Total and subtotal - Help pls.

    Not tested...

    SELECT c.vcPostcode, COUNT(r.SFID), COUNT(t.iCALL_RESULT_ID)

    FROM Customer c LEFT JOIN Contact_Result r

      ON c.SFID = r.SFID

    LEFT JOIN Contact_type t

      ON r.iCALL_RESULT_ID = t.iCALL_RESULT_ID

      AND t.Description = 'SALE'

    John

  • RE: Getting the nth record for each group

    Mark

    In the absence of any sample data, I've used the Northwind database.  This query finds the second highest value of Freight for each CustomerID in the Orders table.  You should...

  • RE: Msg 8152, Sev 16: String or binary data would be truncated.

    G

    You don't provide your table definitions, but I imagine that if you try to fit nvarchar(4000) data into several columns in the same table, it is unlikely to fit.  nvarchar(4000)...

  • RE: Prima inter pares?

    Do you need objects owned by different owners, or are you aiming for the recommended practice of having everything owned by dbo?

    The following query will give you a list of...

  • RE: Install second instance of sqlserver in cluster environment

    You do it in exactly the same way as you did the first one.  You will need a new IP address from your network administrator before you start, and you...

  • RE: Bulk Insert, derived value to insert - how to?

    Robert

    Or create a view of the two joined tables and update that?

    John

  • RE: optimising views

    Reet

    What I'd say about indexed views is that just because you can create one, it doesn't necessarily mean you should.  In my opinion, it's more important to have proper indexing...

  • RE: optimising views

    Jules

    Unfortunately that won't work.  From Books Online (Creating an Indexed View):

    The SELECT statement in the view cannot contain these Transact-SQL syntax elements:

    .

    .

    .

    • Outer or self joins.

    This is...

  • RE: optimising views

    Reet

    Just a few ideas:

    What indexes do you have on the seven underlying tables?  Look at the execution plan of the query and look for table scans or clustered index scans. ...

  • RE: Union of multiresults from sp

    Jakub

    You can't insert the results into a table, because the procedure returns more than one result set.  And you can't do a UNION of the results for the same reason.

    As...

  • RE: Security Setup

    Neil

    Create a login, say WebUser, give it access to the database, put it into a role, say WebRole, and grant WebRole execute permission on each store procedure.  You do have...

Viewing 15 posts - 6,961 through 6,975 (of 7,185 total)