Forum Replies Created

Viewing 15 posts - 1,651 through 1,665 (of 3,544 total)

  • RE: xcopy syntax error

    By default XCOPY will prompt to overwrite files and since prompts cannot be resolved in xp_cmdshell without using TYPE and redirector/pipe, I suspect that is why 'nothing happens'

    Try adding /Y...

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

  • RE: Generating Dates

    quoteNo loops, no cursors, no RBAR   

    You just love patting yourself on...

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

  • RE: Outputting Image Data to a File

    One way to do the stream in sp is to use the sp_OA procs

    DECLARE @conn int, @rs int, @st int, @f varchar(8000), @i int

    DECLARE @hr int

    DECLARE @sql varchar(255)...

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

  • RE: How to add a new column to a table in between the existing columns in SQL Server 2005 or 2000?

    Why? What purpose will it serve?

    However, use Enterprise Manager (2000) or Management Studio (2005)

    Or

    Drop indexes and contraints on the table

    Rename the table

    Recreate the table with the additional column

    Populate the new...

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

  • RE: Multiple records into one row.

    What do you mean by 'large' and what is the datatype of 'Text'

    The usual way to do this is to use a function

    CREATE FUNCTION dbo.udf_text (@ID AS int) RETURNS varchar(8000)...

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

  • RE: Problem in droping constraint

    SQL Server, under certain circumstances (eg CREATE / ALTER table), when generating constraint / key names, will add characters (like your example) to names to make sure they're unique

    To avoid this...

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

  • RE: Function to cast an integer to a varchar where 1 = A, 26 = Z, ...

    quoteYou would have to create a new column, update it based on the IDENTITY column and then drop...

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

  • RE: Function to cast an integer to a varchar where 1 = A, 26 = Z, ...

    REPLACE(CHAR(64+FLOOR(number/27))+CHAR(64+number-(FLOOR(number/27)*27)),'@','0')

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

  • RE: Unable to do Multiple select statements

    The only other thing I can suggest is to use your original code, check that each query's syntax is correct and add the first query code to the end of...

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

  • RE: Unable to do Multiple select statements

    I don't know Informix but suspect it is probably due to multiple joins using ansi-92 syntax. I think Informix requires the query like this

    SELECT i.itin_booking_num, i.itin_revision_num, i.itin_delta_num, i.itin_item_id_num, i.itin_line_num,

     ...

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

  • RE: Unable to do Multiple select statements

    make the first statement a subquery and JOIN it to the second, e.g.

    SELECT i.itin_booking_num, i.itin_revision_num, i.itin_delta_num, i.itin_item_id_num, i.itin_line_num,

      i.itin_parent_id, i.itin_service_type, i.itin_operator_code, i.itin_service_info, i.itin_service_class,

      i.itin_departure, i.itin_arrival, i.itin_from_city, i.itin_from_city_loc, i.itin_to_city,...

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

  • RE: Firing Instead of Trggers with BCP

    bcp, by default, will treat the input file as one batch

    To change the batch size use the -b parameter

    e.g. -b 1

    will set the batch to 1 row and will fire...

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

  • RE: how to retrieve the week number for a given date

    Do you mean

    DATEPART(week,[date]) - DATEPART(week,DATEADD(month,DATEDIFF(month,0,[date]),0)) + 1

    or is there something special about the 'week' number you want.

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

  • RE: Error handling when using set-based processing

    quote...try and do your joins in the FROM...

    With apologies to Shakespeare, but could not resist

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

  • RE: Minimum of top two values

    DECLARE @temp TABLE ([ID] int IDENTITY(1,1),ItemName VARCHAR(6),ItemNo  INT,ItemValue NUMERIC(20, 2))

    INSERT INTO @temp (ItemName,ItemNo,ItemValue)

    SELECT a.ItemName,a.ItemNo,a.ItemValue

    FROM @MyTable a

    ORDER BY a.ItemName ASC,a.ItemValue DESC,a.ItemNo ASC

    SELECT a.ItemName,a.ItemNo,a.ItemValue

    FROM @temp a...

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

Viewing 15 posts - 1,651 through 1,665 (of 3,544 total)