Forum Replies Created

Viewing 15 posts - 23,761 through 23,775 (of 26,486 total)

  • RE: cursor function

    You're going to hate this, but...

    Please provide us with the DDL for the table (the CREATE TABLE statement), sample data for the table (as INSERT INTO statements), what you have...

  • RE: ansi attachment file by using sp_send_dbmail

    :unsure: ??

  • RE: How to define a primary key?

    I'd contact the vendor and request their assistance.

  • RE: Do we need separate job to backup System databases?

    Personally, a separate job for the system databases.

  • RE: insert row in a table inside another database and get identity back

    Looks like this may be the way to go. I amy have to look at the output clause in a little more depth for other uses in my environment...

  • RE: Included index

    Steve Jones - Editor (11/13/2008)


    I can see where the question is a little ambiguously worded. I shall add a "select all" and award back points to people for this one.

    Slightly...

  • RE: insert row in a table inside another database and get identity back

    I'd look at using the OUTPUT clause with the insert. You may be able to get the identity value assigned from the INSERTED values.

    Haven't tried it, but it is...

  • RE: create a stored procedure with insert and update using a cursor

    paul.starr (11/13/2008)


    Does this help any:

    COLUMN NAMES

    CustomerID

    ParentCustomerID

    ParentContactID

    Name

    ShortName

    ReferenceNo

    Logo

    CustomerTypeID

    Templates

    CorpURL

    CorpEmail

    SupportEmail

    SalesEmail

    OtherEmail

    DefaultContactID

    Markup

    DefaultCurrencyID

    PriceListID

    FreightID

    PaymentTypeID

    PaymentTermID

    PaymentTermNotes

    ShippingPolicyID

    CarrierID

    ShippingMethodID

    EffectiveDate

    ExpiryDate

    DefaultTaxRate

    DefaultQuoteDiscount

    DiscountComments

    Notes

    Deleted

    Status

    StatusComments

    StatusChangeDate

    StatusChangeUser

    CreateDate

    CreateUser

    MaintenanceDate

    MaintenanceUser

    LockUser

    LockSessionID

    LockDate

    PriceList_MaintenanceDate

    SyncStatus

    SyncDate

    SyncUser

    DiscountMode

    UpchargeMode

    CreateCustomerID

    CreateContactID

    MaintenanceCustomerID

    MaintenanceContactID

    InUse

    CustomerSalesModel

    CustomerPrefix

    State

    DefaultCustomerAddressID

    DefaultCustomerID

    datatypes, character length

    nvarchar30

    nvarchar30

    nvarchar30

    nvarchar50

    nvarchar20

    nvarchar50

    nvarchar200

    nvarchar30

    nvarchar250

    nvarchar250

    nvarchar50

    nvarchar50

    nvarchar50

    nvarchar50

    nvarchar30

    decimalNULL

    nvarchar30

    nvarchar30

    nvarchar30

    nvarchar30

    nvarchar30

    nvarchar500

    nvarchar30

    nvarchar30

    nvarchar30

    datetimeNULL

    datetimeNULL

    decimalNULL

    decimalNULL

    nvarchar500

    ntext1073741823

    intNULL

    intNULL

    nvarchar500

    datetimeNULL

    nvarchar50

    datetimeNULL

    nvarchar50

    datetimeNULL

    nvarchar50

    nvarchar50

    nvarchar36

    datetimeNULL

    datetimeNULL

    intNULL

    datetimeNULL

    nvarchar50

    intNULL

    intNULL

    nvarchar30

    nvarchar30

    nvarchar30

    nvarchar30

    intNULL

    intNULL

    nvarchar20

    intNULL

    nvarchar30

    nvarchar30

    No. It doesn't. You have to give us something that doesn't require more than cut and paste to use. ...

  • RE: create a stored procedure with insert and update using a cursor

    In SSMS, you can right click on the database and in the pop-up menu select Generate Scripts. Using the wizard, you can select the databae, in the options page...

  • RE: create a stored procedure with insert and update using a cursor

    paul.starr (11/13/2008)


    will it work in 2005?

    MERGE is new to SQL Server 2008, doesn't exist in SQL Server 2005 and earlier versions of SQL Server.

  • RE: CTE vs Derived Table

    Jeff Moden (11/12/2008)


    ... thanks for the leg up, Lynn. 😛

    Just keeping you honest! :w00t:

    I still haven't even hit 3,000 forum posts, but I'm getting close!

  • RE: CTE vs Derived Table

    Jeff Moden (11/12/2008)


    Well I'll be damned... didn't even notice until just now... 12,000+ posts... Steve owes me a shirt or two! 😛

    Actually, according to the scores and standings page...

  • RE: CTE vs Derived Table

    Jeff Moden (11/12/2008)


    ggraber (11/12/2008)


    I was really looking for some basic guidelines.

    I really have come to love the readability of CTEs.

    I just wanted to make sure I wasn't compromising performance.

    I...

  • RE: create a stored procedure with insert and update using a cursor

    Nope. Take a close look at the code. Everything appears to be using user-defined types. Those all need to be the base types for me to do...

  • RE: Help needed: Recursive CTE to flatten text columns into comma delimted field

    Here is a slightly different version doing the same thing.

    DECLARE @test-2 TABLE

    (ID INT, TXT VARCHAR (MAX))

    INSERT INTO @test-2

    SELECT 1,'A'

    UNION

    SELECT 2,'A'

    UNION

    SELECT 2,'B'

    UNION

    SELECT 3,'A'

    UNION

    SELECT 3,'B'

    UNION

    SELECT 3,'C'

    declare @txt varchar(max);

    select

    ...

Viewing 15 posts - 23,761 through 23,775 (of 26,486 total)