Forum Replies Created

Viewing 15 posts - 12,001 through 12,015 (of 13,469 total)

  • RE: Return all rows where one is a match

    looks like a simple IN() stamtent would do the job...you want the entire order if one of the porducts is 'Bike':

    Select

    oph.order_no,

    opd.order_line_no,

    opd.product,...

  • RE: Concatenate

    why not convert them to ints, then cast then as varchars together?

    CREATE TABLE T1(col1 varchar(30),col2 varchar(30) )

    insert into T1

    SELECT '1','09' UNION

    SELECT '02','01' UNION

    SELECT '01','1 '

    SELECT

    convert(varchar,convert(int,col1))...

  • RE: Identifying Obsoleted Database Objects

    I think you'd have to do this with a quick and dirty .net applacation, since it's obvious you can't on the server side:

    i would think that you'd have to recursively...

  • RE: Change columntype in a view

    try changing just the offending columns with CAST or CONVERT, and not the whole formula:

    CAST(beschikbaar * 60 AS float)

    changes to

    CAST(beschikbaarAS float) * 60

    I think that will solve your...

  • RE: How to change the owner of a User-defined data TYpe in SQL 2000

    edited after poutting foot in mouth:

    i had thought just like you that the stored procedure sp_changeobjectowner should do what you want;

    but the article you mentioned states if it's in...

  • RE: Insert and Update

    yeah...still two statements, you really didn't give enough info to help, but here's a lame example:

    --only matches will get updated, right?

    UPDATE TABLEA

    SET PROCESSFLAG='Y' WHERE PROCESSFLAG='N'

    FROM TABLEB

    ...

  • RE: How do I create a conditional counter?

    it's kind of easy...you use a SUM() of CASE statement to logicilly decide whether you want to add the values or zero:

    select * from #Conditional

    select sum(CASE WHEN VALUE BETWEEN...

  • RE: Insert and Update

    no, it'll be two separate statements....but that's not a bad thing.

    can you give more details what you are trying to do?

    this is a very common situation, where you update existing...

  • RE: Convert rows into columns

    ouch...without dynamic sql, and still trying to do it in SQL and not a programming language, I don't know how you'd be able to do it.

    the headache is the max()...

  • RE: Is there a good way to understand the sysdatabases STATUS fields?

    4194840 = TORN_PAGE_DETECTION,OFFLINE,AUTOSHRINK

    528 = TORN_PAGE_DETECTION,OFFLINE

    my script from page one helps find the values, here's a snippet where i just plug in specific values:

    declare @status...

  • RE: Trigger question

    jacob hit the nail on the head; chances are , if you can post the trigger here, we can show you how to re-write it so it handles multiple rows...

  • RE: Get two pieces of data out of one column

    I've only got the Express Edition, but the logic to get the data out should be easily adaptible.

    you want to use a CASE statemnt for each of the variables; "&",...

  • RE: Changing the Server Collation Does not work

    like Glen said, changing the Server collation does not affect any databases, nor the individual columns that exist int he database...you need to handle those seperately.

    Server collation...

    each database collation...

    Each column...

  • RE: SQL 2005 standard edition and max. DB instances?

    found this specific citation; 2005 and 2008 have the same maxes for this

    http://msdn.microsoft.com/en-us/library/ms143432.aspx

    SQL Server Database Engine object ...

  • RE: Query

    doh i didn't even see that CR might mean Carriage Return Line Feed...goodjob...

    Like Hanshi said, you might want something like

    REPLACE(TblC2.strAddr,'~~',CHAR(13) + CHAR(10)) as your expression

Viewing 15 posts - 12,001 through 12,015 (of 13,469 total)