Forum Replies Created

Viewing 15 posts - 16 through 30 (of 683 total)

  • RE: Copy Permissions for a database

    Gosh. This is a long time ago.

    I'd forgotten all about this until I got an email from smorgan just now. And I can barely remember anything about it, so my...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: IF condition

    GSquared (10/2/2008)


    If (select isnull(column, '') from table) != ''

    print 'Not Null or Empty'

    Else

    print 'Null or Empty'

    I'm using Empty for just a space.

    What if the table has...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Separate This Data - Easier Way

    Something along these lines?

    declare @t table (v varchar(50))

    insert @t

    select '10.1.1.%'

    union all select '10.%'

    union all select '10.1.%'

    union all select '99.%'

    union all...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Separate This Data - Easier Way

    I'm not clear on the goal. Could you write it out for your sample data so we have a clear example?

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: IF condition

    if exists (select * from table where nullif(column, ' ') is null)

    print 'column contains either a null or a space'

    else

    print 'column contains...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Extracting from a table

    Here are a few possibilities...

    declare @t table (id int, v varchar(50))

    insert @t

    select 1, '654:JT12;678:JT56;'

    union all select 2, '6549:JT129;6789:JT569;453:JT435;'

    select *,

    ...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: WHERE Clause Question

    select * from Table where not (FirstName = 'Jimmy' and LastName = 'Woods')

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: SQL 2000 - Retrieve ID value from XML field

    Replace all instances of < with &lt; to post your XML...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Returning XML from a stored procedure (SQL2005)

    Try replacing every < with &lt; before posting...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: TSQL Message Filter

    Here's my effort. I was assuming there could be multiple messages in #t1, which makes it a bit trickier. I'm not proud of it, but anyway...

    --Sample Data

    --drop table #t1

    create table...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: How to select records with a range of ASCII character codes

    No worries - glad to help 🙂

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: How to select records with a range of ASCII character codes

    richard (8/22/2008)


    That returns all alphanumeric values but I want the opposite.

    Huh? Did you see the not symbol (^)? Here's an example...

    --Sample Data

    declare @t table (v varchar(100))

    insert @t

    ...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: SQL Programming

    My understanding is slightly different. Here's what I came up with...

    set dateformat dmy

    --Sample Data

    declare @t1 table (EMPID int, WEFDATE datetime, DEPTID int)

    insert @t1

    ...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: (o^_') ROOT of all numbers

    Here's an example of the cube root of 27...

    select POWER(1.0 * 27, 1.0 / 3)

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: How to select records with a range of ASCII character codes

    Will this work?

    select * from YourTable where YourColumn like '%[^a-zA-Z0-9]%'

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

Viewing 15 posts - 16 through 30 (of 683 total)