Forum Replies Created

Viewing 15 posts - 361 through 375 (of 479 total)

  • RE: User Defined Function Execution

    janine.rawnsley (5/7/2008)


    Hmm I know exactly how UDF's work given that I write/use them but this question must have been worded really badly (for me).

    "SELECT UDF FROM Table" - to me...

  • RE: T-SQL query

    Although I realised that this was another silly question which was going to have an answer which was language specific, inflexible and basically stupid, my immediate thought was to use...

  • RE: Rebuild Master

    This is something I didn't know and which is probably quite important.

    MS does mention that service packs and hotfixes should be reapplied

    Important The resource database (mssqlsystemresource) is...

  • RE: A Function Gotcha with the Use of an Asterisk

    sammesel (4/30/2008)


    To see dependency of objects you can use the stored procedure: sp_depends

    A. to see all compiled objects which depend on a table:

    sp_depends tablename

    B. to see all objects (i.e tables,...

  • RE: Ordereing an IP address

    janine.rawnsley (4/30/2008)


    Do'h.. a bit more test data (or coffee) and that would have jumped out at me.

    It took me 2 attempts as the example was originally going to be '192.001.001.001'...

  • RE: Ordereing an IP address

    janine.rawnsley (4/30/2008)


    The table variable is only created for demo purposes..

    Just use ORDER BY CAST(replace (IPAddr,'.','') as int)

    No, because this would place '192.1.1.1' before '19.2.1.12'.

    Also addresses like '192.168.123.234' would cause...

  • RE: A Function Gotcha with the Use of an Asterisk

    Ian,

    I too was going to post a script to do the job, but the drag/drop method is waaaaaaaaaaay better! 😎

    Here it is anyway

    create proc print_select_for

    @table varchar(128)

    as

    begin

    declare @s-2...

  • RE: SP2

    Rajan John (4/28/2008)


    run select @@version; you should get 3042 if sp2 is installed

    This is true only if you haven't installed any hotfixes or cumulative updates.

    select serverproperty('productlevel') will return 'SP2' irrespective...

  • RE: Identity Columns

    Craig (4/29/2008)


    Don't rubbish the editor 🙂 Busy guy and good good site!!! So what if occasional question gets through that gets some people riled, surely some questions should?

    I actually like...

  • RE: Identity Columns

    Steve Jones - Editor (4/28/2008)


    Easiest depends on the answers given. We don't try to always pick the best of all possibilities. We try to pick questions to get you to...

  • RE: Identity Columns

    Steve Jones - Editor (4/28/2008)


    Perhaps pseudo code is too confusing for this one, but there is no sys.columns.is_identity column. Hence that's not a real answer.

    However I can see the confusion...

  • RE: Identity Columns

    Thinking about this over lunch, it seems that the choice between the 2 answers which give correct results comes down to the interpretation of the phrase 'how can you easily...'....

  • RE: Identity Columns

    Anthony K. Valley (4/27/2008)


    Hmmm... it depends on your point of view. If you view the syntax literally, then only one answer is correct.

    However, if you view the possible...

  • RE: Identity Columns

    I just checked the URL given and found that the first list of the table actually says that sys.identity_columns inherits columns from sys.columns, so I would say this confirms that...

  • RE: Identity Columns

    Whoever 'made up' the answers should have checked that the made up' answers didn't work. I'd previously used 'select * from sys.columns where is_identity=1' so ticked that, hence got this...

Viewing 15 posts - 361 through 375 (of 479 total)