Forum Replies Created

Viewing 15 posts - 2,791 through 2,805 (of 2,894 total)

  • RE: Format the data in table

    Lowell (6/10/2010)


    i think something like this would be better: it's set based, so it's fast, and if the data doesn't start with the offending char, it's not adversly affected:

    --remove preceeding...

  • RE: Format the data in table

    You better to check if the value has ';' character in front and at the end. So I suggest the following (together with table and data setup, which you better...

  • RE: query to insert data into two table from same page

    You can use OUTPUT clause.

    INSERT Table1 (Col1, Col2, ... Coln)

    OUTPUT INSERTED.Col1, [anything else]

    INTO Table2

    VALUES (Val1, Val2, ......

  • RE: bcp error

    kasi.alagu (6/6/2010)


    ...

    Error: Unknown argument '+' on command line.

    ...

    Please guide me.

    This error is due to the fact that you missing some quotes in the select statement! Somewhere in your select the...

  • RE: CTE Query Question

    Can you specify exactly how you want your results to look like? Do you want comas in results?

    Is this what you want?:

    ;WITH PP

    AS

    (

    SELECT OrderID, InsuranceName, ROW_NUMBER()...

  • RE: CTE Query Question

    Do you want a real blank or a space? Using varchar you can have the space in the middle of string like ', ,' but not in the...

  • RE: CTE Query Question

    This will not need temp tables and will do similar job:

    ;WITH PP

    AS

    (

    SELECT OrderID, InsuranceName, ROW_NUMBER() OVER(Partition By OrderID Order By OrderID, InsuranceName) AS PayerPartition

    ...

  • RE: CTE Query Question

    Please provide create table and test data insert scripts in order to setup your case.

  • RE: bcp error

    I have no idea what you are trying to do, but the error you have is not in your bcp statement but in SELECT itself and it is due to...

  • RE: TSQL Return start/end price and start/end datetime by product name.

    I couldn't believe your performance figures and I've desided to test myself.

    After loading 140707 records into PowerItem table and adding index on PowerUpdateID (which I'm sure you have, otherwise your...

  • RE: SQL QUERY

    biren (6/2/2010)


    Eugene Elutin (6/2/2010)


    Basically, my sample does exactly the same:

    It copies some records from Table_B to Table_A (condition is in WHERE clause) and at the same time it deletes these...

  • RE: SQL QUERY

    Basically, my sample does exactly the same:

    It copies some records from Table_B to Table_A (condition is in WHERE clause) and at the same time it deletes these copied records from...

  • RE: Struggling to engage brain! SQL code requiring a simple solution!

    Dom,

    Ref: AND (@Date IS NULL OR ISNULL(Dates, @Date) >= @Date)

    Yes, we need to ignore NULLs in the Dates column in this filter, otherwise these records will not...

  • RE: SQL QUERY

    That is easy!

    This part supposed to be provided by You to help set up your case tables and sample data.

    😀

  • RE: SQL QUERY

    Try this method:

    create table #Table_A

    ( id int not null identity (1,1)

    ,val varchar(30)

    )

    create table #Table_B

    ( id int not null identity (1,1)

    ,val varchar(30)

    )

    insert...

Viewing 15 posts - 2,791 through 2,805 (of 2,894 total)