Forum Replies Created

Viewing 15 posts - 2,686 through 2,700 (of 3,544 total)

  • RE: Is it possible to grant exclusive execution on a SP?

    Kenneth, I would disagree with 'shaky', not ideal maybe.

    The problem with using a semaphore is that if an error occurs that stops the procedure then the semaphore is not changed and you...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: bcp statement

    Try this

    DECLARE @bcp as varchar(8000)

    select @bcp = 'CMD /C ' +

    'bcp "Select * From Salesperson_Dimension" queryout SalesPersonFiletemp.txt -S servername -T ' +

    ' && type SalesPersonFiletemp.txt >> SalesPersonFile.txt &&...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Is it possible to grant exclusive execution on a SP?

    Top of the head idea, not tried or tested.

    Create a new table to contain two columns, procname and datetime. Put all sql in proc within a transaction. Add an update...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Forcing continuous output from Stored Proc

    Thought it would cheer you up, after your rather terse post, you old sour puss you

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Forcing continuous output from Stored Proc

    Declare @sdate datetime, @edate datetime

    Set @edate = CONVERT(varchar(10),GETDATE(),102)

    Set @sdate = @edate - 11

    select s.SNUMBER, s.NAME, d.[DATE] as RecDate

    from dbo.SINFORM s

    left outer join dbo.DATARECS d

    on...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Stored Procedure help required.

    Declare @sdate datetime, @edate datetime

    Set @edate = CONVERT(varchar(10),GETDATE(),102)

    Set @sdate = @edate - 11

    select s.SNUMBER, s.NAME, d.[DATE] as RecDate

    from dbo.SINFORM s

    left outer join dbo.DATARECS d

    on...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: A simple one ?

    Declare @sdate datetime, @edate datetime

    Set @edate = CONVERT(varchar(10),GETDATE(),102)

    Set @sdate = @edate - 11

    select s.SNUMBER, s.NAME, d.[DATE] as RecDate

    from dbo.SINFORM s

    left outer join dbo.DATARECS d

    on...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Transforming Row into columns

    CREATE TABLE stagingtable(rowid int IDENTITY(1,1), input varchar(100))

    DTS into stagingtable, then select as follows

    SELECT u.input as 'User',ISNULL(t.input,'') as 'Time',ISNULL(l.input,'') as 'Location'

    FROM stagingtable u

    LEFT OUTER JOIN stagingtable t...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Stored Procedure issue

    SELECT department,

      [Date],

      SUM(CASE [Product] WHEN 'E-Tech' THEN [output] else 0 END) as 'E-TECH',

      SUM(CASE [Product] WHEN 'E-9' THEN [output] else 0 END) as 'E-9',

      SUM(CASE...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Stored Procedure issue

    If you replace [Daily Total] in the first select with

    SUM([Daily Total]) as 'Daily Total'

    and remove [Daily Total] from the GROUP BY clause

    then you should get

    110 2004-04-01 00:00:00 146.0 0.0...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Best data type for storing "Hours"

    Smallmoney is 4 bytes and has a maximum of 214,748.3647

    To hold the equivalent in decimal would be 9 bytes decimal(10,4)

    However if you are only storing to 2 decimal places then

    smallmoney...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: To Default or not to Default

    alzdba,

    I am writing some of the procs, but the 3rd party will be writing some. I have two choices, either put defaults on the columns where needed (they are NOT...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: How can I make connection to a Solid DB?

    OK some simple instructions to get you foing

    DTS is Data Transformation Services. It allows the transfer and transformation of data to/from SQL server.

    In EM (Enterprise Manager), expand your server

    Select your...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Best data type for storing "Hours"

    From BOL:

    p (precision)

    Specifies the maximum total number of decimal digits that can be stored, both to the left and to the right of the decimal point. The precision must be...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Stored Procedure issue

    There was errors in the case statements and i missed product in the select. When using subqueries you have to give them an alias, i called the subquery a but...

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 15 posts - 2,686 through 2,700 (of 3,544 total)