Forum Replies Created

Viewing 15 posts - 10,516 through 10,530 (of 13,461 total)

  • RE: Mutually exclusive foreign keys

    the only way i could think of doing this was with a check cosntraint and a user defined function.

    if you could have provided more details, we could have helped with...

  • RE: Copy table into linked server

    you cannot create a table on the fly across a linked server. the select into...from tries to do that.

    you can only insert into tables that exist.

    so INSERT INTO ...

  • RE: Stored Proc Versioning

    I've used extended properties for this purpose; then i can test if the extended property has the desired value before decinding to allow a script to run or not.

    [here's an...

  • RE: Create a trigger based on time

    you get the best results here if you provide full details(if you can), the CREATE TABLE, the specific condition(THIS column changes, affect THIS OTHER column)

    here's an example which *I Think*...

  • RE: Generate MAc addresses with a stored procedure

    so you need to generate just under a million rows;

    here's how i did it:

    DECLARE @StartRange BINARY(8)

    DECLARE @EndRange BINARY(8)

    SET @StartRange = 0x00000004A500114B

    SET @EndRange = 0x00000004A50F11FF

    --select convert(integer,+ @EndRange)...

  • RE: practical RBAR removal: convert integers to binary

    Nice solution, Jonathan;

    only thing i thought is he might want the preceeding zeros for comparison, if he needs the values as flags?

    for example the value 2 returns "10",where he might...

  • RE: Generate MAc addresses with a stored procedure

    ok here's one way:

    i'm assuming you want it in the same format i see when i do ipconfig/all

    pairs of [0-9,A-E] with dashes:

    cross joining the widget below against a row-number derived...

  • RE: Group by Count question

    you have to join against the master table of all the departments;

    otherwise if it doesn't exist in the employees table you cannot display it

    something like this:

    select

    alldepartments.department ,

    ...

  • RE: Saving Query Results to .txt using Scripts

    both bcp and the more robust sqlcmd have the ability to be fed a query and output the results to a file;

    that is your best choices, unless you write/find a...

  • RE: Deduplication of Photo and Finger Print Data

    I'm guessing you are just coming on board with a shop that does this? I would say they must have that software in their shop already; I would lean more...

  • RE: Divide by subsets of same table

    its that integer division raising it's ugly head again;

    both counts are INT values, and SQL figures if you do any math(add,subtract, muultiply or divide) to two integers, the answer must...

  • RE: How do I wildcard search all columns in a database?

    doh! i was looking for that kind of logic hole, too small-o-variable, glad you found it!

  • RE: Changing Usernames

    not that I'm particularly evil or anything, but if I joined a month before, say Jeff Moden did, does that mean if I change my username now to "Jeff Moden",...

  • RE: xp_delete not working

    i thought i read here on the forum that xp_delete would only delete certain extensions of for file names....

    when i ggogled "SQL SERVER xp_delete file extensions", i found some different...

  • RE: Get DDL for any SQL 2005 table

    sp_getDDL returns the complete CREATE TABLE command in TSQL; I've been using it in a DDL audit trigger, and also using it more often then sp_help.

    Could some of you folks...

Viewing 15 posts - 10,516 through 10,530 (of 13,461 total)