Forum Replies Created

Viewing 10 posts - 46 through 55 (of 55 total)

  • RE: Optimize TSQL

    use temporary table.

    create index if necessary.

    Be cautious for using function [ sum(value(parameter)) ] with large number of data

  • RE: Rapid Growth Of Data and Purging Issues

    use truncate statement. it has many adventages

    Because truncate has not where clause and you need some data, then you can save them in another temp table, truncate base table and...

  • RE: Script to find all filestream databases with list of Tables (contain filestream column)

    use this

    create table tableColumn1 (db varchar(300), tableName varchar(1000), columnName varchar(1000))

    sp_msforeachdb 'insert into tableColumn1 select "?" AS db, a.name tableName, b.name columnname from [?].sys.tables a join [?].sys.columns b on...

  • RE: Linked Server error

    first check on linked server in ( component services -> computer -> mycomputer -> distributedTransaction there is local DTC.) On local DTC properties tab security allow remote access.

    if you do...

  • RE: How to set value of procedure to variable?

    Hi sasia

    you need to define output parameter to your procedure

    for example

    create procedure HowMoneyIsInTheWallet

    (

    @IDOsoby int,

    @Wallet int OUTPUT

    )

    AS

    -- your code where you set value to @Wallet

    return @Wallet

    call the stored procedure

    ...

  • RE: E-Mail Triggers

    i think problem is in calculation in select statement.

    try in this way

    Select @Voucher = i.ap101_voucher,

    i.ap101_amt,

    i.AP101_GL_ACCT into #temp

    from inserted i

    select @VATPERCENT=( sum(case when AP101_GL_ACCT in ('70102501110', '70102501120') then ap101_amt...

  • RE: Wrong datatype for SP?

    Hi, SSC-Dedicated

    Based on your experience,

    i would be appreciate if you explain in detail how SQL Injection will pass this.

    P.S.

    maybe in this case it's no so important, this select statement is...

  • RE: Wrong datatype for SP?

    Input format is wrong and this line

    MC.materialItemContainerCode IN (" + @containerCodes +")'

  • RE: Wrong datatype for SP?

    Hi Junglee_George,

    make your query dynamic.

    declare @sqlText varchar(max)

    set @sqlText = 'SELECT

    MC.MaterialItemContainerCode,

    MC.ReceptionDate,

    C.clientName ,

    MI.materialItemName

    FROM

    MaterialsItemsContainers MC

    INNER JOIN MaterialsItems MI WITH(NOLOCK)

    ON (MC.materialItemIncId = MI.materialItemIncId AND MC.materialItemSqlId = MI.materialItemSqlId AND MI.isDeleted=0x0)

    INNER JOIN Clients AS C...

  • RE: trigger to restrict access for changing login permissions in sql server 2008

    Hi Grasshopper,

    you can make new database role, depending on your specifications. Set your XXX user to that role

Viewing 10 posts - 46 through 55 (of 55 total)