Forum Replies Created

Viewing 15 posts - 751 through 765 (of 1,554 total)

  • RE: Use GETDATE() within a UDF

    Well, let me disagree with the absolutness of that statement. It depends. You can very well put table access inside UDF's, sometimes it's even the best thing to do - BUT... everyone...

  • RE: Is there an easy way to copy data from one column to another within the same table?

    I'm in a picky mood today

    Don't use this old legacy syntax:

    update a set a.MyNewColumn = b.MyOldColumn from table1 a ,...

  • RE: Temporary Tables and Ident Fields

    I don't quite see why that should be a problem... Could you elaborate on your particular situation?

    /Kenneth

  • RE: Temporary Tables and Ident Fields

    No, not directly - identity doesn't take a variable for it's seed.

    This doesn't work...

    declare @i int

    set @i = 100

    create table #x( id int not null identity(@i,1), myVal...

  • RE: database column value check

    ..or use LIKE / NOT LIKE with wildcards if ISNUMERIC() doesn't cut it.

    Using wildcards will also provide some control that ISNUMERIC() doesn't give you, should it be needed.

    BOL has...

  • RE: please help ..triggers or any thing

    Before declarative constraints (eg FK's) came to SQL Server, triggers was used to enforce referential integrity. If that is your purpose, then start by looking at CREATE TRIGGER' in BOL...

  • RE: How to find Table dependencies

    This would work well, IF..... all FK's are implemented as declared foreign keys (ie that it actually exists a foreign key constraint).

    Unfortunately there's nothing that prevents a column to have...

  • RE: Recursive Select On the table

    David, what I ment is just that some types of functions implements a 'cursory behaviour' under the hood when used in a query. In effect what you get is a...

  • RE: Random varchar function exposed?

    Yes, looks like it. The suffix generated looks just like a random number in hex.

    Never given a second thought if there was any special function that did that.

  • RE: Self-Join Update

    Well, I doubt it.

    I'm guessing that you're getting scans all the way, because you have functions on the dates and also negations in the wehere clause, all things that invalidates...

  • RE: Random varchar function exposed?

    Have no clue. Why do you want to know? If you need a ready-baked randomfunction, why not NEWID() ..?

    /Kenneth

  • RE: How to find Table dependencies

    Yes, you're on the right track. But, as you've noted, it's not 100%.

    Though, what you have is about as close you can get - for the rest you need to...

  • RE: Recursive Select On the table

    Your example suggests that the objids are in descending order.

    Why don't you use David's example and check with that yourself? After all, you know your data best.

    Using a function this...

  • RE: How to find Table dependencies

    Well, here's bad news for you - there is no reliable way inside SQL Server to see all object dependencies with certainty. (sysdepends et all does not work reliably)

    If you...

  • RE: CREATING NEW PRIMARY KEYS AND TEMP TABLES

    Not sure I completely grasp your actual problem here, but.. why do you think you need dynamic SQL just to move rows from one table to another..?

    /Kenneth

Viewing 15 posts - 751 through 765 (of 1,554 total)