Forum Replies Created

Viewing 15 posts - 16 through 30 (of 100 total)

  • RE: Sa password missing

    Try to connect with NT Authentication with someone that is a member fo the local admin group. If you can't get in that way, then... well... you still have...

  • RE: Perplexing User-Defined Scalar Function Problem

    Take a look at the code it is generating for the query... it might just be building it wrong.

    You could always create the query manually:

    Create a new query in design...

  • RE: query returns wrong result

    Don't worry... I think we've all done that before 🙂

  • RE: query returns wrong result

    Is it possible that you are looking at two different tables with two different owners?

    Run this to see if there is more than one table of the same name owner...

  • RE: Using dateadd

    It chooses the style for the date.

    If you look up information on the CONVERT function you should see information about style. 101 for example is mm/dd/yyyy.

  • RE: Using dateadd

    Yes,

    If you want to match for the same day you'll have to convert each datetime component to a more general date:

    select transactiondate from fuelinvoice where convert(varchar(10),transactiondate,101)=convert(varchar(10),dateadd(d,-1,getdate()),101)

    or if you...

  • RE: Calculating Running Products in T-SQL

    Your issue might be your join to list dates... It's hard to join based on dates... even more so if your doing it with a right outer join and a...

  • RE: Determining # of rows

    Use the @@rowcount Global Variable...

    declare @iCount int

    select * from sysobjects where type = 'u'

    select @iCount = @@rowcount

    if @iCount = 0

    begin

    RAISERROR('Error: 0 Rows returned.',16,1)

    return

    end

  • RE: Creating a Trigger based on a date

    Well you should probably plan this out a bit...

    How many rows are you expecting in the table?

    What type of activity is expected? Ex. 10% Insert, 20% Update, 70% Select.

    At what...

  • RE: Executing command files using "xp_cmdshell"

    One difference between xcopy and copy is that copy is an internal command. It's built into the command interpreter, so as long as you have a correct path to...

  • RE: Server Network Utility - Default Ports

    The best way to handle this is to keep the instance name and port the same between boxes so that when it fails the only thing you'll need to know...

  • RE: proc. taking too long

    Wow... that's a great example of bad code. It should be illegal to use temp tables like that. For starters, clean it up a bit... If it's still...

  • RE: pass variable from command line to xp_send

    Have you tried generating your testemail.txt file from a different batch file first to fill in the DOS variable %eaddress% with the value?

    echo Use msdb > testemail.txt

    echo Exec sp_start_job @job_name...

  • RE: ORDER BY clause

    The only thing I can think of is to massage your data before you return it... however, this might be too expensive if thier is a high number of rows...

  • RE: How do I copy rows in asp app

    This should work for you:

    SELECT * INTO #TMP1 FROM TBLA WHERE ID = 'abc'

    UPDATE #TMP1 SET ID = 'xyz'

    INSERT INTO TBLA SELECT * FROM #TMP1

Viewing 15 posts - 16 through 30 (of 100 total)