Forum Replies Created

Viewing 15 posts - 556 through 570 (of 1,554 total)

  • RE: Join with where clause?

    I'm also curious how #3 differs from the others.

    Adding to that, example #3 uses the 'soon-to-be-deprecated' legacy join syntax and is highly discouraged to use these days.

    /Kenneth

  • RE: getting started with BCP

    From what I've been told, the reason that BULK INSERT is promoted as faster than BCP, is that BULK INSERT internally uses a more optimized codepath within the engine, than...

  • RE: Simple SQL Question (i think)

    This isn't quite the same thing. It does find dupes alright, but in this case it's also required that you have some additional column(s) to filter against. (userid in this...

  • RE: Filtering records by Months

    If your table looks similar to this example, then I think this may work..

    create table #x (client_ref char(3) not null, year char(4) not null, month char(2) not null...

  • RE: Simple SQL Question (i think)

    It's not needed to find the duplicate values, but what PW showed was how to retrieve the rows based on the duplicates in it's entirety.

    For that a derived table is...

  • RE: Scientific Notation on float datatype

    I really don't know, perhaps there is some differences in language settitngs or the windows locale settings..?

    Is this what you see in QA or in some other app? The use...

  • RE: Need Quick Answer---Calc Date for Under 18

    Here's yet another variation on the age theme.

    -- Determining current age notes.

    -- To be able to determine current age based on...

  • RE: Getting different results from Query Analyser than Stored Procedure

    The part that could produce different results is probably this line:

    ON t.tyre_auto = r.tyre_auto OR r.tyre_auto = NULL

    You should never use '= NULL' for null comparisons.

    It should be changed to...

  • RE: Odd or even numbers

    You can take the value and MOD by 2.

    select x.i, case x.i % 2 when 0 then 'even' when 1 then 'odd' end

    from

         ( select 1 as i union all

     select 2...

  • RE: Can you delete from multiple tables with a Delete Stmt?

    No.

    You can only write to one table at a time.

    (insert, update or delete)

    It's ok to do ops based on joins from several tables, but the columns that are to be...

  • RE: Importing Flat file to table using format file

    Ah yes, that is probably more accurate.

    I had an old example lying around, but in it the last few columns were being skipped, not any in between, so I missed...

  • RE: Inserting sproc resultset into a table

    Maybe best to check again.

    Your syntax is fine, but the result returned does not match the table you're trying to insert into.

    They aren't the same.

    If you still can't find the...

  • RE: update a field in table2 given condition in table1

    update t2

    set    t2.dssid = t1.dssid

    from   table1 t1

    join   table2 t2

    on     t1.id = t2.id

    and    t2.dssid is null

    .. should do it.

    -- edit

    but as with everything, test it before actually attempting to do the...

  • RE: Importing Flat file to table using format file

    It's been a while since I made a format file, but to skip a column, in the format file for that column, specify a length of zero and no delimiter

    ......

    1      ...

  • RE: Suppressing Error messages in SP

    1)

    There are different kinds of errors, with different behaviour regarding to what you can and can't catch within a stored procedure. Do you have an example of an error (with...

Viewing 15 posts - 556 through 570 (of 1,554 total)