Forum Replies Created

Viewing 15 posts - 3,046 through 3,060 (of 6,036 total)

  • RE: Link Server Script

    More universal script:

    select *

    from master.dbo.SYSREMOTE_TABLES (

    'linked_server_name',

    NULL,

    NULL,

    NULL,

    NULL )

    Works not only on SQL Server remote servers but any kind of remote servers, including ODBC connection to files using Jet.OLEDB driver.

  • RE: Updating records vs Insert records

    UPDATE A

    SET ....

    FROM TableA A

    INNER JOIN TableB B ON B.KeyCol = A.KeyCol

    INSERT INTO TableA

    (columns list)

    SELECT B.Columns list

    FROM TableB B

    WHERE NOT EXISTS (

    select 1 from...

  • RE: Check Constraint

    Error with severity level 16 raised within a transaction (trigger is always within transaction) will cause rolling it back.

  • RE: Converting Integer to Text

    It must be [Extension]<80, not [Extension]<'80' .

  • RE: Indexing

    Then you probably don't have columns in your WHERE clause.

  • RE: How do you handle la arge amount of characters?

    Jeff, I believe you're ovecomplicationg the problem.

    I would suggest:

    1) create simple ReportTable

    (

    SeqNo smallint NOT NULL PRIMARY KEY,

    ReportString varchar(8000) NULL

    )

    2) Populate this table with lines to be reported, lines must...

  • RE: Check Constraint

    AVB, what if somebody will insert or update more than 1 row?

    Any error in further rows will happily bypass your check and end up in the table.

    And don't tell me...

  • RE: assigning exec query result to variable

    I support sp_executesql approach.

    But the query IMHO is built not in the best way.

    I must be like this:

    'select count(' + QUOTENAME(@fldname) + ' ) from CONTACT2 '

  • RE: How do you handle la arge amount of characters?

    Jeff Moden (5/9/2008)however, sometimes you gotta do what ya gotta do.

    Never.

    Period.

    Unless you're an amateur and don't have plans to become a professional.

    What would your car mechanic say if you'd...

  • RE: How do you handle la arge amount of characters?

    Who told you that MS SQL Server is a text editor?

    Don't trust that person any more. It's not true.

    You should chose appropriate task for every job.

    To spike with a microscope...

  • RE: Check Constraint

    AVB (5/9/2008)I guess that's a limitation of a constraint. It applies to all the data.

    I guess that's a limitation of a relational database.

    Data must be consistent.

  • RE: SET @@IDENTITY OFF ?????

    kevin mann (5/9/2008)

    I don't know... ask the authors of Access. I cannot control which identity is returned back to the UI. Or can I?

    Returned by what?

  • RE: Open Rowset with Dynamic SQL

    boumerlin (5/8/2008)

    The one caveat to this approach is that you have to use a global temp table if you're planning on creating a temp table on the fly and inserting...

  • RE: Dynamic sql in function

    What are you trying to do?

    Concatenate some values to a string?

    Then search this forum and/or script section of this site for concatenate function(s), chose the one you like the most.

    And...

  • RE: Warning Message....

    If to add a simple instruction:

    SET ANSI_WARNINGS OFF

    select

    count(*) as theCount,

    count(n) as theOtherCount,

    avg(n) as theAverage

    from

    ( select 1.0 as n union all

    select 3.0 union...

Viewing 15 posts - 3,046 through 3,060 (of 6,036 total)