Forum Replies Created

Viewing 15 posts - 6,286 through 6,300 (of 8,753 total)

  • RE: IMPLICIT_TRANSACTIONS & BEGIN TRAN

    Thomas Abraham (1/12/2015)


    Hugo Kornelis (1/12/2015)


    I thought that using SELECT would have started the implicit transaction, but I tested after answering this question and nothing changes if I use SELECT instead...

  • RE: Help With Trying to Import File Names into a Table

    Polymorphist (1/9/2015)


    Folks i'm dead in the water here - can anyone help at all? Nothing I try works and I have a feeling i'm overlooking something very simple.

    Quick thought,...

  • RE: Running Totals

    Quick partial solution, missing the handling of negative stock count though.

    😎

    SELECT w.ItemId

    ,w.DateID

    ,w.OpenningWareHouseUnits

    ,w.FcastSales

    ,w.GoodsIncoming

    ,w.TargetRunningStock

    , SUM((ISNULL(w.OpenningWareHouseUnits,0) + ISNULL(w.GoodsIncoming,0)) - w.FcastSales) OVER

    ...

  • RE: Tiered Commission Plan

    Quick simple solution, note that the output is not formatted but that's easy

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    --INVOICE DATA

    IF OBJECT_ID('tempdb..#RawData') IS NOT NULL DROP TABLE #RawData;

    CREATE TABLE #RawData (Invoice varchar(7), Quantity int,...

  • RE: How to model a slowly changing dimension

    Quick questions, are these assumptions correct?

    😎

    1) Definition: Territory is a Geographical Area, defined by a collection of Zip Codes, each of which represents either a Geographical or a Pseudo location....

  • RE: search date field by partial date?

    Slightly simpler solution for SQL Server 2008 and later, produces the same results

    😎

    declare @pSomeDate as varchar(20) = '04/2011';

    SELECT

    recid

    ,weeknumber

    ,title

    ...

  • RE: Assistance with an IF THEN in SQL Sever 2008 R2?

    chef423 (1/11/2015)


    hmmm, that's why I put the output of the above code in the thread...

    No worries...Ill figure it out on my own then.

    If you don't understand the original code then...

  • RE: How can I write a query make the selection

    anu.anu4u (1/11/2015)


    Actually my table is

    [activityid] [int] IDENTITY(1,1) NOT NULL,

    [salespersonid] [int] NULL,

    [activitydate] [datetime] NULL

    I am trying to make a calender using a gridview...

  • RE: Scalar Function to determine last date for 4 different rule conditions - Final step - 4 Date Variables - what is latest

    Quick suggestion based on Jeff's post

    😎

    /****** Object: UserDefinedFunction [dbo].[RE_2190] Script Date: 1/10/2015 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    -- ST APD Submit

    -- Can not have Approved, or...

  • RE: Help me to tune this query in a better way

    Jeff Moden (1/11/2015)


    prabhu.st (1/11/2015)


    as of now the query is taking 19 seconds to bring the result set with pagination for 300454 records.

    Are you saying that (and it looks like...

  • RE: How can I write a query make the selection

    anu.anu4u (1/11/2015)


    I have a table named activity with fields activityId,activitydate. How can I write a query to select activityId from the table between two dates in such a way that...

  • RE: Help me to tune this query in a better way

    prabhu.st (1/11/2015)


    Hi,

    I am struggling a bit to reduce the execution time for the below query. kindly help me to tune this and to get a optimized performance.

    as of now the...

  • RE: Server: Msg 824, Level 24, State 2, Line 13

    First of all welcome to the forum, next some quick questions, have you checked the SMART for the SSD? Is this the full and unedited/altered output of DBCC?? How did...

  • RE: stored proc (@param_1,@param_2) exec(create view as (select .. @param_1)

    ravikumar_v (1/10/2015)


    Hi,

    Require help in passing parameters to a stored proc for ex:

    GO

    create procedure [dbo].[sp_create_proc]

    (

    @v_in_dbnm varchar(255),

    @v_in_schemanm varchar(30)

    )

    as

    BEGIN

    DECLARE @v_in_dbname nvarchar(255)

    DECLARE @v_in_schemaname nvarchar(30)

    DECLARE @sql nvarchar(MAX)

    SET @v_in_dbname = @v_in_dbnm

    SET @v_in_schemaname = @v_in_schemanm

    SET @sql='CREATE...

  • RE: SQL Select stament

    Jeff Moden (1/10/2015)


    Requires prior knowledge that the "T" is the exception. I realize that's exactly what the OP asked for but was that just because of the example he...

Viewing 15 posts - 6,286 through 6,300 (of 8,753 total)