Forum Replies Created

Viewing 15 posts - 6,721 through 6,735 (of 7,429 total)

  • RE: How to Set Current Schema in SQLServer ?

    Sorry, I know of no way off hand to do it for the session. You could create a view to the object with same name and dbo as owner I...

  • RE: Joining against a Linked Server

    Either way just add you join and the db.schema.table to join.

    Ex

    SELECT *

    FROM <SERVER>.<DB>.<DBO>.<TABLE>

    INNER JOIN

    <LOCALDB>.<DBO>.<TABLE>

    ON

    THIS = THAT

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston...

  • RE: Worst Practices - Not Using Primary Keys and Clustered Indexes

    I am still not sure I will agree with you on a every table should have a Primary Key or index (clustered or non). Small tables that take up no...

  • RE: You just might be a DBA if.....

    ...You spend hours on end with the same query mumbling something to the effect of "We can rebuild it, we have the technology. We can make it faster."

    "Don't roll your...

  • RE: How to Set Current Schema in SQLServer ?

    sp_changeobjectowner [ @objname = ] 'object' , [ @newowner = ] 'owner'

    so

    sp_changeobjectowner 'Partner', 'bar'

    and so no schema needed do

    sp_changeobjectowner 'Partner', 'dbo'

    "Don't roll your eyes at me. I will tape them...

  • RE: Creating a table from a subquery

    Ok

    SELECT * INTO dbo.NewTable FROM OldTable WHERE .....

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • RE: cursor elimination (performance improvement)

    Hit this about 30 minutes after going to bed last night and see it much better than my previous query.

    UPDATE calltable SET ProviderCountry =

    (SELECT TOP 1 country FROM countrycodes WHERE...

  • RE: Creating a table from a subquery

    Not like you have it. Only this way

    CREATE TABLE tablename (

    ColumnDefinitionsHere

    )

    INSERT INTO tablename (ColumnListAcceptingDataHere) SELECT (*) from tablename2

    WHERE condition, etc, etc..

    Create table cannot add data to the table, this must...

  • RE: Bulk Insert

    To get the single apostrophes just double them when building dynamically. And triple to concatinate a string in while keeping the singles around it.

    Ex.

    DECLARE @some_string VARCHAR(500)

    SET @some_string = 'Bulk Insert...

  • RE: "UNICODE DATA INSERTION"

    CREATE PROCEDURE ip_InsertIt

    @value1 nvarchar(100),

    @value2 datetime

    AS

    INSERT INTO tablename (col1,col2) values (@value1,@value2)

    Just like doing any other stored procedure with a non-unicode datatype.

    "Don't roll your eyes at me. I will tape them...

  • RE: Limiting Values

    Do this with a check constraint. Ex.

    ALTER TABLE tableX WITH NOCHECK

    ADD CONSTRAINT limitvalue CHECK (columnx IN ('A','I','U')

    If you want to have check table at creation chnage NOCHECK to CHECK

    See...

  • RE: cursor elimination (performance improvement)

    Ok this was really fun and here is how I figured to get around the duplicates

    UPDATE calltable

    SET ct.country = cc.country

    FROM

    calltable ct

    INNER JOIN

    countrycodes cc

    ON

    left(ct.callnumber,len(cc.prefix)) = cc.prefix

    WHERE

    cc.prefix = (SELECT TOP 1...

  • RE: SQL Server 2000 Installation problem

    2 things

    1) Are you trying to do this thru the Terminal Services Client?

    2) Can you post the text from the following files or email to me.

    CNFGSVR.OUT

    SQLSTP.LOG

    "Don't roll your eyes...

  • RE: cursor elimination (performance improvement)

    Still thinking about the problem with the multiple problem which is the base issue and will slow you down. I will try a few things later and let you know...

  • RE: cursor elimination (performance improvement)

    You apparently posted at the same time I was, I am trying to think about that to make sure it is covered.

    "Don't roll your eyes at me. I will tape...

Viewing 15 posts - 6,721 through 6,735 (of 7,429 total)