Forum Replies Created

Viewing 15 posts - 46 through 60 (of 74 total)

  • RE: What front end tools do you use?

    DanielG's feedback was very helpful for me. thankz

  • RE: Unique Constraint Question

    alter function fn_UniqueActive(@p1 int,@p2 int)

    returns int

    as

    begin

     declare @retVal int

     if @p2 = 1

     begin

         set @retVal = (select count(*) from t1 where (f1 = @p1 and f2 = @p2))

     end

     else

     begin

         set @retVal = 1

     end

     return...

  • RE: T-SQL question in SQL 2005

    declare @MyArray table(item1 int unique, item2 varchar(10), item3 datetime)

    insert into @MyArray values(1,'aaa',getdate())

    insert into @MyArray values(2,'bbb',getdate())

    insert into @MyArray values(3,'ccc',getdate())

    insert into @MyArray values(4,'ddd',getdate())

    insert into @MyArray values(5,'eee',getdate())

    select * from @MyArray where item1...

  • RE: connecting sql

    C:\Documents and Settings\jambuk>isql -E

    1> use JambuDB

    2> select * from t1

    3> go

     f1          f2          f3          f1Avg

     ----------- ----------- ----------- -----------

             111         222         333         444

    (1 row affected)

    1> exit

    C:\Documents and Settings\jambuk>

  • RE: data load from on table to another

    this should still work

    --Step 4

    --======

    --time taken for 1 million records - 2 minutess and 23 seconds

    update t1

    set t1.f3 = cast(t2.f3 as float)

    from t2

    where t1.f1 = t2.f1

    and t2.f2 = t2.f2

  • RE: The Power of Technology

    AWESOME!!!

    GOD IS GREAT!!!

    Yep Power of technology is great, and kudos to CNet!

  • RE: The Power of Technology

    Sad that such things do happen. It was consoling of you to

    touch up on non-SQL humane issues. Hope the Kims get back safe. at...

  • RE: computing column values

    is this what you are looking for, or something more involved. If so pl give some examples of data, (input and output.)

     

    create table t1 (f1 int, f2 int, f3 int,...

  • RE: raiseerror and transactions

    yep

     

    IF @@TRANCOUNT > 0

         BEGIN

              ROLLBACK TRANSACTION

              raiserror('Jambus Error1', 16, 1)...

  • RE: raiseerror and transactions

    if you wish to log the error into a file, just change the raiserror statement like this

    raiserror('Jambus Error1', 16, 1) with log

    then go to the following file(assuming your SQL Server...

  • RE: data load from on table to another

    here is a solution that takes 2 minutes and 23 seconds for 1 million records. Obviously the time taken will be exponential for 10 such sets, because the scan size...

  • RE: raiseerror and transactions

    AWESOME!

    I did not know you were using 2005. I thought you are still living with 2000 like many of us. (ofcourse I have my personal 2005 at home

  • RE: raiseerror and transactions

    --Step 1

    --======

    --Create the table and one record

    if exists(select * from sysobjects where name = 't1')

     drop table t1

    create table t1(f1 int, f2 int)

    insert into t1 values(111,888)

    select * from t1

    --Step 2

    --======

    --Execute the...

  • RE: Import Excel data into SQL Database

    Step 1

    ======

    Create an Excel file like this, starting from A1. Note that there are five fields. The fifth field does not have any

    values except for one row.

    Col1 Col2 Col3  Col4 Col5

    111 aaa 12/1/2006 111aaa 

    222 bbb 12/1/2006 222bbb 

    333 ccc 12/1/2006 333ccc 

    444 ddd 12/1/2006 444ddd 

    555 eee 12/2/2006 555eee nullvalues

    666 fff 12/2/2006 666fff 

    777 ggg 12/2/2006 777ggg 

    888 hhh 12/2/2006 888hhh 

    999 iii 12/2/2006 999iii 

    Save the file...

  • RE: Live or Memorex?

    Hi Steve,

    Even though I appreciate your concern, I don't like the idea of recorded demos. Let the errors happen, what's the big deal? We are all programmers right.

    It would...

Viewing 15 posts - 46 through 60 (of 74 total)