Forum Replies Created

Viewing 15 posts - 196 through 210 (of 321 total)

  • RE: T-SQL Quiz of the Day -- Multiple Choice

    Try this and look at SP after : )

    CREATE PROCEDURE spTest;4

        @EmployeeID INT,

        @City       VARCHAR(15) = 'London'

    AS

       SELECT   EmployeeID, LastName, FirstName, City

       FROM     Employees

       WHERE    EmployeeID = @EmployeeID ...

  • RE: Temporarily override column restrictions in Bulk Insert

    Do you have DEFAULT VALUE for the NOT NULL fields in the table definition?

    As govinn mentioned you can use BulkInsert with format file but if you won't have values or defauls...

  • RE: Calculate Moving Average

    Holidays .... that's nice to have .... : )

    I knew about missing days (even from sample) data but i just wanted to point that if he picks a Certain no...

  • RE: Matching Values

    You can Use TSQL successfully

    but my advice is to use the Alg that is NOT RECURSIVE (wich is fast my last VB post) and for MyStack,SOL use a Table Variable...

  • RE: Calculate Moving Average

    SET NOCOUNT ON

    DECLARE  @stocks TABLE( TradeDate datetime NOT NULL,TradePrice decimal(10,2))

    INSERT INTO @stocks SELECT '1/1/2005', 10

    INSERT INTO @stocks SELECT '1/2/2005', 12

    INSERT INTO...

  • RE: Matching Values

    : ) That's the catch to make to  alg process as many posibilities as posible : ) (wich takes time : )   )

  • RE: Puzzling results

    Yes is the smallest but is not the one who dictate the result ... and from here your high time for certain values ...

    What you should do now is to...

  • RE: Puzzling results

    SELECT TOP 10 u.Serial, r.Model, u.Release, d.EventDate

    FROM Production_Unit u LEFT JOIN Production_Detail d ON u.Serial = d.Serial LEFT JOIN Release r

    ON u.Release = r.Release

    WHERE r.Line = @Line and d.EventID...

  • RE: Puzzling results

    Cause value 10 fetches more rows in ProductionUnit?

    try to select how many rows are with this value in ProductionUnit... comparing to values from 1 to 9

     

    When you remove the order...

  • RE: Bulk Insert into Predefined Table

    To obtain a Format File you can use this command

    bcp MyDB..MyTable format test.txt -f "ExportFormat.fmt"  -c -t \t -r\n -S MyServer -T

     

    because your data is fixed length you will have to...

  • RE: transference of datas using bcp???

    If you have the Table just use this command to generate the FormatFile that you need

    bcp [MyDB]..[MyTable] format test.txt -f "ExportFormat.fmt"  -c -t \t -r\n -S ServerName -T

    or you can...

  • RE: Distributed transaction problem

    Maybe this is your prob :

    EXECUTE permissions for a stored procedure default to the owner of the stored procedure, who can transfer them to other users. Permissions to use the...

  • RE: Matching Values

    The VB code Recursive Code is Working as good as the NonRecursive code in VB (at least that's how it seems)

     

    I was trying 339, 219 with the SQL code...

  • RE: Matching Values

    With some tunning this VB code is WAY faster than the Recursive solution( try  219,339,439 wich are really time consummers values for the recursive version)

    Dim ArrayValues() As Double

    Dim MyStack() As...

  • RE: Summing up Specific Values

    Maybe I just looked at his last post :

    -- just do not sum up the nSpeed for those records with nStatus = 1

    which is contractidory to what he sais at...

Viewing 15 posts - 196 through 210 (of 321 total)