Forum Replies Created

Viewing 15 posts - 1 through 15 (of 15 total)

  • RE: classic asp ADO timeout problem with OleDB but ok with ODBC

    Hi Lowell,

    Which 3 items do you mean ?

    I've used :

    Connection.connectionTimeout = 120

    Command.CommandTimeout = 120

    Third one ?

    Thks in advance ^^

  • RE: Function call with field from a table as parameter

    Hi Sergiy.

    Of course you 're right ! In the example i'd better create a view, but in the real world, my problem is that I want to search for a...

  • RE: Function call with field from a table as parameter

    Hi GilaMonster

    In fact, you're right, this is a simplification just here to generate the error for convenience.

    But in the real world, I need to search...

  • RE: Insert/Update Trigger to replace column value

    I usually code this kind of trigger like this :

    create trigger trigger_name

    on table_name

    for update

     as

       update table_name set LastUpdateDate = getdate()

        where exists (select * from inserted

                 where...

  • RE: Run a dts package from outside DTS

    You can run it with a command line statement :

    dtsrun /Sserver /Uuser /Ppassword /Ndts_package_name

    correctly encapsulated to give corrects parameters.

    Regards

  • RE: Accessing Excel File

    You can do that :

    EXEC sp_dropserver 'EXCELTEST', 'droplogins'

    go

    EXEC sp_addlinkedserver N'EXCELTEST', N'Jet 4.0',

                       N'Microsoft.Jet.OLEDB.4.0',

                       N'\\server\path\file.xls', NULL, N'Excel 5.0'

    GO

    EXEC sp_addlinkedsrvlogin N'EXCELTEST', false

    GO

    Then, you can :

     select...

  • RE: date formart

    Hi,

    if your rule is as the system datetime format,  (i.e. integer part = date and decimal part = nb secondes since 00:00), you can just use :

    select...

  • RE: Retrieving the ID of a record just inserted

    if your column is not IDENTITY qualified, you should consider encapsulation of the insertion in a stored proc with an output parameter returning the inserted value :

    1° Begin transaction

    2°...

  • RE: Converting varchar dates to datetime

    ...predefined sure..., but things can go wrong when differents languages are used by different users with the same query (or proc) as the implicite conversion...

  • RE: Selecting and viewing (NOT deleting) duplicate rows in a table

    Hello,

    You can try the following :

    select inv_tag, count(distinct rm_id)

    from table1

    group by inv_tag

    having count(distinct rm_id) > 1

    Bye...

  • RE: send output to txt file

    I can imagine a solution based on the xm_cmdshell system proc like this :

    declare @FetchCustomerID varchar(5),

            @FetchCompanyName varchar(40),

            @WkCommand varchar(100)

    declare cursor_test cursor...

  • RE: sysperfinfo blues...

    I found an interresting article on this table saying that it's a pseudo table which SQL Server constructs on the fly only when...

  • RE: Trying to SUM on an alias field

    The syntax above (ISNULL) is simplier than your initial CASE, but you could also use it in the Group by :

    Select ...

    GROUP BY CASE...

  • RE: Trying to SUM on an alias field

    I think the point is as simple as :

    select ISNULL(CUST_ADDRESS.STATE, CUSTOMER.STATE), sum(RECEIVABLE.TOTAL_AMOUNT)

    from ...

    group by ISNULL(CUST_ADDRESS.STATE, CUSTOMER.STATE)

    ???

  • RE: Help using TOP n

    You can also use the TOP 1 syntax in the (select...) as below :

    use Northwind

    select systab.name as Tables,...

Viewing 15 posts - 1 through 15 (of 15 total)