Forum Replies Created

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

  • RE: Batch file

    use XP_CMDSHELL to run a .bat file in query analyser

  • RE: Problem with SQL SP Where - using IF or Case

    Alter PROCEDURE dbo.U_SorTransaction_SelectAllBackOrders

    (

    @SalesOrderID int = 0,

    @AllocationEndDate datetime

    )

    AS

    SET NOCOUNT ON;

    Declare @Select as nvarchar(2000)

    Declare @Where as...

  • RE: Problem with SQL SP Where - using IF or Case

    modify these below statement as given below

    from

    ----------

    Declare @Select as varchar(1000)

    Declare @Where as varchar(1000)

    to

    -------

    Declare @Select as nvarchar(2000)

    Declare @Where as nvarchar(1000)

    and then try again

  • RE: Problem with SQL SP Where - using IF or Case

    Create PROCEDURE dbo.U_SorTransaction_SelectAllBackOrders

    (

    @SalesOrderID int = 0,

    @AllocationEndDate datetime

    )

    AS

    SET NOCOUNT ON;

    Declare @Select as varchar(1000)

    Declare @Where as...

  • RE: Get result for only one user

    can you please throw a little more light on your requirement because i am not able to understand your problem

  • RE: Problem with SQL SP Where - using IF or Case

    It can be achived by building the sql statement dynamically and then executing the SQL statement with sp_executeSQL @statement

    Please let me know if you need any more help

  • RE: tracking\logging database access

    Please run the below statement and you will get an idea to achive your goal.

    select * from master.sys.sysprocesses where spid=@@spid

  • RE: Stored Procedure speed versus Select Statement

    It seems you have huge data update, insert and delete in the table. Please try to re-organise the table index and the query will execution will be faster.

  • RE: Sum two columns from two tables

    select (temp1.qty1-temp2.qty2)as Total from

    (select sum(qty)as qty1 from t1

    group by Number,location) temp1,

    (select sum(qty)as qty2 from t2

    where P1>0 and P2='Order'

    group by Number,location) temp2

    please let me know it doesn't suit your requirement.

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