Forum Replies Created

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

  • 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 ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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*...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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)...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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 ,

    ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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!

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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",...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Returning value along with a table

    -=oops i did not see you were using an output parameters...thought you wanted the RETURN; i'm testing the other way now, and will report back, sorry...jumped to conclusions=-

    oops old...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

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