Forum Replies Created

Viewing 15 posts - 286 through 300 (of 388 total)

  • RE: *=,=*

    You can set compatibility level per database. You have migrated this database from SQL 2000 so its compatibility level stayed at 80. You can change it using sp_dbcmptlevel stored proc....

  • RE: how can we use 'or'in query

    What is you want to achieve?

    Piotr

  • RE: *=,=*

    Yes, but the compatibility level will have to stay below 90. This syntax will be depreciated in future.

    create table t1(a int)

    create table t2(b int)

    go

    select a from t1, t2 where t1.a...

  • RE: Troubleshhoting User''s permissions

    also, check if the click handler doesn't swallow exceptions. it's unbelievably common to have empty catch block.

    Piotr

  • RE: Stored Procedures to execute other SPs containing parameters

    Is that what you have in code?

    CREATE Procedure usp_Run_all_4_Procedures

    @FolderDate datetime

    @Servicea string

    @acYearStart datetime

    @Serviceb string

    AS

    EXEC usp_Run_all_4_Procedures

    It should be

    CREATE Procedure usp_Run_all_4_Procedures

    (

    @FolderDate datetime,

    @Servicea string,

    @acYearStart datetime,

    @Serviceb string

    )

    AS

    EXEC...

  • RE: hi , how can i delete duplicate records in two tables...

    Please send sample table schemas, sample data and desired result. You must agree that there is no precise answer to your question.

    Piotr

  • RE: SQL Express with Excel

    Hi,

    Read about linked servers or openrowset function. There are examples how to connect to excel.

    Piotr

  • RE: Help with Update Query

    It would help if you sent the DDL for your tables. I thought you want to update email in [name] table from [name_address] as this third party app is using...

  • RE: send data into excel sheet

    By default OPENROWSET is disabled. You have to go to Surface Area Configuration tool and enable it.

    Piotr

  • RE: Temp Tables in Stored Procedures

    You can't create local temporary tables using sp_executesql

    the reason is that local temp tables (with single # sign) are destroyed when current session is disconnected. sp_executesql creates a new session...

  • RE: how to see server logins

    is this what you are looking for?

    select * from sys.syslogins

    or

    select * from sys.server_principals

    Piotr

  • RE: call a function from sp_executesql

    Duh, of course, exec. My mind is focused on weekend now 🙂

    Thanks!

    On the other hand, Stef is also using exec:

    N'exec @ValueOUT=@CustomFunctionName @InPtHt, @InHtUnits'

    wouldn't it be better to use set/select?

    N'set...

  • RE: call a function from sp_executesql

    Adam, could you explain why there is no plan reuse in the latter case?

    Piotr

  • RE: call a function from sp_executesql

    usually you put 'select' before function name.

    SET @strExec = 'select ' + @FunctionName + ' @InPtHt, @HtUnits'

    if this is a scalar function, declare output parameter and pass it to sp_executesql

    Piotr

  • RE: Table Linking in SQL Server Express?

    You have to use linked server. Read in BOL about them.

    Piotr

Viewing 15 posts - 286 through 300 (of 388 total)