Forum Replies Created

Viewing 15 posts - 31 through 45 (of 683 total)

  • RE: SQL Statement needed

    Your google not working?

    select *, fName + ' ' + lName as FullName from

    (

    select 'Fred' as fName union

    select 'Wilma' union

    ...

    Ryan Randall

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

  • RE: SQL Statement needed

    Sounds like you need to use 'CROSS JOIN'...

    http://technet.microsoft.com/en-us/library/ms190690.aspx

    Ryan Randall

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

  • RE: A question about the Decimal data type

    Or rather - that's the minimum decimal size which could hold it.

    Ryan Randall

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

  • RE: A question about the Decimal data type

    meichner (8/1/2008)


    I am confused about something when it comes to the decimal data type. Is the decimal point considered part of the precision? In other words how is...

    Ryan Randall

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

  • RE: Not like '%%'

    Chris Morris (8/1/2008)


    That's well smart, Ryan. Got a TSQL version? 😛

    Huh?

    Ryan Randall

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

  • RE: Not like '%%'

    Chris Morris (8/1/2008)


    Why use a simple solution when a complicated one works just as well? 😛

    SET NOCOUNT ON

    DROP TABLE #Temp

    CREATE TABLE #Temp ([ID] Int identity(1,1),Skilltype varchar(1000))

    INSERT INTO #Temp (Skilltype) select...

    Ryan Randall

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

  • RE: Not like '%%'

    You should seriously consider modifying your table design so that it's more normalised. As a minimum, I would recommend creating a table like #t1 below. You can do this on-the-fly...

    Ryan Randall

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

  • RE: How to Change the default date format in sql server 2005...

    ramkumar (7/27/2008)


    Hi..

    I agree with u..

    But whats my friend's requirement is to change the settings which attained by sql server 2005..

    by default it is coming like

    SET DATEFORMAT mdy;

    select getdate()

    Result:

    2008-07-28 10:26:25.920

    Can I...

    Ryan Randall

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

  • RE: Problem while using in operator

    shankartup (7/28/2008)


    HI all,

    i am facing a problem while passing arguments using in operator

    i have a master table colors and a transaction table colordetails

    select Colorname as ColorName from colors where colorid...

    Ryan Randall

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

  • RE: SELECTing a sample

    Venkatesan Prabu (7/27/2008)


    Nice to join with you all in answering this question,

    Select field1,GroupKey from

    (

    select row_number() over (partition by GroupKey order by GroupKey) as rownumber , field1,GroupKey from @mytable

    )tbl

    where tbl.rownumber<=2

    The...

    Ryan Randall

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

  • RE: dateformat little fast reply

    Chris Morris (7/25/2008)


    RyanRandall (7/25/2008)


    Here's an alternative...

    select cast(stuff(stuff('280908', 5, 0, '/'), 3, 0, '/') as datetime)

    Is it friday or have we been here before?

    Yep - You sniped me by a few...

    Ryan Randall

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

  • RE: dateformat little fast reply

    Here's an alternative...

    select cast(stuff(stuff('280908', 5, 0, '/'), 3, 0, '/') as datetime)

    Ryan Randall

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

  • RE: A white space in a URL

    Just a guess...

    EXEC master.dbo.xp_cmdshell 'md "\\l5600b\share\sergei\test del\test"'

    Ryan Randall

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

  • RE: 3 table join even if not exist

    Or, if you can use your main table, it can be even simpler...

    select t.ItemNo, a.qty, b.qty, c.qty from

    MainTable t

    left outer join...

    Ryan Randall

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

  • RE: 3 table join even if not exist

    select t.ItemNo, a.qty, b.qty, c.qty from

    (select ItemNo from TableA union select ItemNo from TableB union select ItemNo from TableC) t

    left outer...

    Ryan Randall

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

Viewing 15 posts - 31 through 45 (of 683 total)