Forum Replies Created

Viewing 15 posts - 12,961 through 12,975 (of 13,469 total)

  • RE: Looping through data dable created by data adapter

    usually, you get a collection of rows from the datatable, and loop thru the rows:

    Dim

    dt As DataTable

    Dim

    a()

  • RE: stored procedure creator

    there's pretty much only two ways; setting up a trace, which you stated you wanted to avoid;

    you'd need to set up a trace to capture TSQL statement completed, and then...

  • RE: Changed one field in SQL database

    Greg's example is actually a bit better;

    your example script would work, but it would always say 50000 rows affected, as there is no where clause. with no where clause,...

  • RE: constraint: enforce unique key on subset of rows

    constraints are enforced acrross all data in the table, and there's no conditional constraints.... so you can't have a constraint  Client_id and Code_id  where  isactive_flag = 'N' and a different...

  • RE: Up system table

    Rgr is absolutely right....if you had a stored proc that was 30K in length, it would just occupy 7 rows in the syscomments table(30K /4K = 7 rows)

    your boss on high...

  • RE: Views and Tables

    and to expand on what Ken said, if the table doesn't exist yet, you can use the INTO command to create it on the fly:

    SELECT Col1, Col2, ...

    INTO MyNewTable

    FROM YourView

  • RE: Trigger To External DB

    From what you stated, I think I'd add a linked server for the Pervasive database, then write a procedure to grab the data from the ERP/Pervasive database, and insert that...

  • RE: triggers

    something like:

    CREATE TRIGGER tr1 ON Transactions

    AFTER INSERT,UPDATE AS

    INSERT INTO TransactionLog(TransactionID, TransactionStatusCode, LogDate, ErrorCode, Comments )

    --the table [INSERTED] is  the data being affected by insert/update:

    SELECT TransactionID, TransactionStatusCode, LogDate, ErrorCode, Comments FROM...

  • RE: Trigger To External DB

    i'm assuming you want the trigger to insert data that is placed in an SQL table to also be propigated to a non-SQL table; you know that the virtual table[INSERTED]...

  • RE: Implementing multiple keyword search feature in site.. How to????

    I think you'll want to avoid any functions like CONVERT and CHARINDEX in your joins/where clauses, as that requires a full table scan in order to get the data so...

  • RE: I''''m looking for a program/script that generates a clear script

    here's a simple example: assuming ('TBSTATE','TBSTATE','TBCOUNTY') is the lookup tables that should not be deleted

     declare @level tinyint

     set @level = 0

     create table #tables (

      id int not null primary...

  • RE: Min value across columns

    i think id' try to use a subselect and max function:

    SELECT PKColumn,othercolumns,MAX(DerivedDate) from

    sometable

    left outer join

    (select PKColumn,DateColumn1 as DerivedDt from sometable UNION

    select PKColumn,DateColumn2 as DerivedDt from sometable UNION

    select PKColumn,DateColumn3 as DerivedDt...

  • RE: BigBrotherClient and CIMW32Ex

    Big Brother® is a Web-based systems and network monitor. A universal color-code interface of "red is bad and green is good" allows anyone to measure the health of a network...

  • RE: truncate table

    i'd speculate that someone tried to truncate a table that was referenced by a foreign key, got an error, and assumed that it was not supported;

    truncate table deletes all the...

  • RE: Combining rows in same table

    to really help, we'll need the real schema; use enterprise manager, select the table, right click>>All Tasks>>Generate SQL Scripts

    paste the results here;

    you can join the same table on itself when you...

Viewing 15 posts - 12,961 through 12,975 (of 13,469 total)