Forum Replies Created

Viewing 15 posts - 106 through 120 (of 201 total)

  • RE: JOIN Question

    Well if you really want the join you can change your join to

    LEFT JOIN #tempAccountOwner b

    ON a.AccountID = b.AccountID

    ...

  • RE: Arith overflow error converting int/numeric to data type numeric

    KBSK (11/25/2010)


    Hi,

    I did not get what is wrong with the below piece of code?

    declare @VERS numeric(2,2)

    set @VERS = 1

    --or

    --set @vers = 1.00

    select @VERS

    I get error

    when set @vers = 1

    Arithmetic overflow...

  • RE: variable assignment to SELECT, and empty result sets

    mister.magoo (11/24/2010)


    Oh yes and, of course you should not do this:

    SELECT @variable1 = (SELECT column1 FROM table WHERE column2 = 'somevalue')

    unless you want an error for selecting multiple rows in...

  • RE: Transactions

    Should be worth 2 points.

    - Cant copy/paste

    - Multichoice question

    - Judging by right/wrong ratio (53/47 at time)

    /T

  • RE: How to pick specific data from a varchar(250) size column

    Shamshad Ali (11/22/2010)


    Stuck in next step, there are some other values which does not work with my existing function. here is the new sample data:

    ?link=ProductsAndServices?src=NLVANOV10_lid={5F86099C-AFDD-DF11-80B8-001CC023728E}&stid=1&ptu=1

    ?src=NLVANOV10_lid={5F86099C-AFDD-DF11-80B8-001CC023728E}&stid=1&ptu=1

    Should check both & and _lid...

  • RE: cursor appropriate?

    Not needed

    Depending on uniqueness something like

    insert into #table2 (t_col2) select col1 from #table1

    insert into #table3 (f_col3) select t_col1 from #table2 t2 join #table1 t1 on t1.col1 = t2.t_col2

    could work.

    If...

  • RE: two insert statments takes long time to process

    Im going to guess that the test when you broke them up into 2 SPs isnt entirerly accurate.

    Im guessing you made 3400 usp_addRecords followed by 3400 usp_addclientNumbers. Which isnt...

  • RE: two insert statments takes long time to process

    Well the

    insert into tblClientList (clientNumber)

    select clientNumber

    from tblOrder

    where not exists

    (select *

    from tblClientList

    where tblOrder.clientNumber=tblClientList.clientNumber)

    group by clientNumber

    part is slightly extreme. It will look on all rows in the tblOrder and make sure that...

  • RE: Conditional Order By

    Richard Warr (11/16/2010)


    I thought it was an interesting question as well - currently more people have it wrong than right which shows that we can still be surprised at the...

  • RE: Conditional Order By

    Carlo Romagnano (11/16/2010)


    I should remember implicit cast using CASE clause.

    Good question. I refreshed implicit cast.

    In sql2000, it gives error also with SET @sortby='Date1'. (Syntax error converting datetime from character string.),...

  • RE: Conditional Order By

    Okay not the best question. However i wouldnt go as far to say it was nonsence. It shows that you cant mix different datatypes in a conditional order by without...

  • RE: Execution plan

    Thank you both.

    I did figure it would be partly because of the much larger dataset. I had just assumed that something in the execution plan regarding cost (CPU/IO/Operator) would...

  • RE: How to achieve a non grouped column in an aggregate function

    Maybe something like this could work.

    /*Testcode*/

    declare @Items table (Price integer, Vendor varchar(32), Item varchar(32))

    insert into @Items(Price, Vendor, Item)

    select 56,'Peter','Shirt' union all

    select 56,'Bob','Shirt' union all

    select 15,'John','Tie' union all

    select 16,'Bob','Tie' union all

    select...

  • RE: Color coding

    And the answer is "False" because? I would definatly say that my statusbar changes color... hence "True".

    /T

  • RE: Name of currency to add to local currency value (i.e. EU, CZK. GBP)

    p.ravirao (10/14/2010)


    Thanks very much. it is very much useful stuff.I will test with table variable.

    I have 45 countrries in table.

    Here is my query snippet..i did changed as for my reqs.

    select...

Viewing 15 posts - 106 through 120 (of 201 total)