Forum Replies Created

Viewing 15 posts - 2,086 through 2,100 (of 3,544 total)

  • RE: Removing characters from a string

    or

    STUFF('A1EC1XXXXXX-52',6,6,'')

    if they are not really X's

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

  • RE: Removing characters from a string

    REPLACE('A1EC1XXXXXX-52','X','')

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

  • RE: URGENT help with statement please

    Because '[Transaction]' is 13 chars long and the difference between the string with and without all '[Transaction]' is 26 (in this case) and divided by 13 gives 2 (the number of...

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

  • RE: URGENT help with statement please

    'The Dreaded Dynamic SQL Syndrome'

    DECLARE @sql nvarchar(4000),@inStr nvarchar(2000)

    SET @inStr = '[Transaction]=1000 OR [Transaction]=2000'

    SET @sql...

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

  • RE: Need help building #temp table

    Just had a thought, if max(i.jeno) + 1 is to be the same for all records then put this in a variable first and use the variable in the select

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

  • RE: Need help building #temp table

    To use max(i.jeno) you must have a GROUP BY clause and you need to aggregate m.linecost or specify it in the GROUP BY

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

  • RE: Question of the Day for 14 Nov 2005

    According to http://msdn2.microsoft.com/en-us/library/ms143393 only Enterprise to Enterprise upgrade is supported.

    SQL Server 2005 Standard (and Enterprise) memory is limited to Operating system maximum and therefore, to be pedantic, not unlimited.

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

  • RE: How do I create a custom identity?

    quoteThanks for the kudo, David. It's a real pleasure to hear coming from you.

    We sycophants have got...

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

  • RE: Using exec on stored procs w/ variable args

    Not knowing how your system is setup but you could try something like this

    DECLARE @sql varchar(8000)

    SET @sql = null   ' Need to do this at top of each loop

    SELECT...

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

  • RE: How do I create a custom identity?

    Very nice Jeff

    Wish I'd thought of that

    Could use your code for a COMPUTED COLUMN but...

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

  • RE: Dynamically determine datatype on an INSERT INTO statement

    Not sure I understand this

    First, use IS NOT NULL instead of <> NULL

    Second, is the column [Name] nvarchar or not

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

  • RE: Dynamic Queries - Can this be done

    quoteMy apologies for posting what I am about to post on here...

    EXEC(@querypart1 + @querypart2 + @querypart3 +...

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

  • RE: insertion of a string

    quoteI am a clown.

    I make people laugh!

    I am a clown. I make people laugh!

    WOW

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

  • RE: Importing From Excel Not Using DTS

    You could try using openrowset like this

    SELECT * FROM

    OPENROWSET('Microsoft.Jet.OLEDB.4.0',

    'Excel 8.0;HDR=YES;Database=C:\temp\book1.xls', [sheet1$])

    but I have had problems using this if the spreadsheet does not reside on the sql server

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

  • RE: How do I create a custom identity?

    Depending on how the new records are inserted

    use a control record to store last key generated

    CREATE TABLE ControlRec(key1 tinyint,key2 tinyint,key3 smallint)

    INSERT INTO ControlRec(key1,key2,key3) VALUES (65,65,-1)

    DECLARE @key1 tinyint,@key2 tinyint,@key3 smallint,@key char(5)

    BEGIN...

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

Viewing 15 posts - 2,086 through 2,100 (of 3,544 total)