Forum Replies Created

Viewing 15 posts - 2,476 through 2,490 (of 3,544 total)

  • RE: Insert daily records from one table to individual merchant tables

    If you are inserting into a table and creating on the fly then I assume you are already using dynamic sql or have an if statement for each merchant.

    I agree with...

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

  • RE: Does table field allow nulls?

    I do not know PHP but if you need a sql query then

    select c.isnullable

    from sysobjects o

    inner join syscolumns c

    on c.[id] = o.[id]

    and c.[name] = 'column'

    where...

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

  • RE: Finding datetime range intersections and durations

    Still thinking about this but all I could up with so far is to put all the dates in order (start & end), work out the date segments and then match...

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

  • RE: "Ignore alpha command" -- Please Help

    Use

    ISNUMERIC(ITEMNO)  =  1

    to test for numbers only

    use

    PATINDEX('%[A-Z]%',ITEMNO)

    to determine the location of alpha

    if the alpha is always at the end then

    SELECT CAST(CASE WHEN ISNUMERIC(ITEMNO) = 1

    THEN ITEMNO

    ELSE LEFT(ITEMNO,LEN(ITEMNO)-1)

    END...

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

  • RE: how to insert from Stored Procedures to #temp table

    Do you mean this

    CREATE TABLE #temp (col1 int, col2 int, ...)

    INSERT INTO #temp

    EXECUTE procname

    INSERT INTO #temp

    EXECUTE anotherproc

    INSERT INTO [maintable]

    SELECT col1, col2, ...

    FROM #temp...

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

  • RE: Returning current table name to a trigger

    Steve,

    It certainly was not meant as an insult and I would never intentionally post such things on a forum. If my attempt at humour did upset you then I apologise.

    I must...

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

  • RE: Returning current table name to a trigger

    quoteI thought, incorrectly, that as Developers - we were here to help each other in the generation of...

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

  • RE: Count Multiples

    A lot will depend on what indexes you have (if any) and also what is missing in the 'select id from...'. What I do is to break down your query...

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

  • RE: Finding datetime range intersections and durations

    Sorry that it did not help, since you query used whole hours for duration I continued that in my solution

    Did not realise...

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

  • RE: Table design

    I did read somewhere in all that Microsoft bumph online that Microsoft's solution for this type of problem is to split the table into smaller tables and join using a...

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

  • RE: Upgrade 7->2k; help with collation problems!

    You could EM to script all the tables for each SQL2K database which will give you column collations which you can then analyze.

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

  • RE: Using IN in a where clause from ASP .net

    Try this

    Select * from myTable WHERE CHARINDEX(',' + m_NAME + ',' , ',' + @codeList + ',') > 0

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

  • RE: rewrite code to eliminate isnull

    as I said before your query

    Select col_a

    from some_table

    where Date_col = isnull((select date from tableA where id=host_id()),getdate())

    will always invoke a table or index scan

    If [tableA] has [id] as a...

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

  • RE: Returning current table name to a trigger

    quoteEagles may soar in the clouds, but weasels never get sucked into jet engines.

    And Steve,

    It is difficult to...

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

  • RE: exporting row with newline character to a text file

    Jeff's answer should work, eg

    bcp "select 'abcd'+CHAR(13)+CHAR(10)+'efgh'" queryout test.txt -S servername -T -c

    will produce a text file with

    abcd

    efgh

     

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

Viewing 15 posts - 2,476 through 2,490 (of 3,544 total)