Forum Replies Created

Viewing 15 posts - 11,536 through 11,550 (of 13,460 total)

  • RE: problem calling stored procedure

    Jeff it does still work; it depends on the commands you use; I've got an article coming out on a procedure i wrote that returns the DDL of any table;

    your...

    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: problem calling stored procedure

    to get a procedure to run under the context of the database it is called from, doesn't it HAVE to be in the MASTER database and also at least start...

    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: Real line numbers

    also from within SSMS:

    Tools>>Options>>Text Editor

    Expand "All Languages"

    under the "Display" section, there is a semi-gray checkbox...uncheck and check to enforce line numbers for All languages and files.

    Now line numbers appear on...

    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: Lock login at specific date

    you could also use a logon trigger that checks the login against getdate() & some expiration date in a table, and use that logon trigger to prevent logging in.

    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: Why this Function is Slow?!

    both sqls in the union seem to be filtering on Application name, so If they ran alone, I would think they'd be fairly quick.

    the union instead of union all could...

    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 to add the windows login user as a memeber of sysadmin to SQL, so I can log into the SQL using windows authentication

    if you know the administrator password when you set up the machine, you can log in as that:

    at the login screen which lists all the users, hit control-alt-delete twice...this will...

    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: Query Structure - Multiple tables

    the sum() function does not take a comma delimited list: change all the commas to plus signs to sum all the columns and all the rows:

    select SUM (e.GROSWAGS_1 +...

    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: problem calling stored procedure

    ok, i copied and pasted your ocde, and found the #fraglist gets populated just fine.

    the second cursor "index" never ran on my machine, because the condition below was never met:...

    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: NOT IN on Null value returns incorrect results

    yeah the issue is db_id can return null:

    select db_id('Bob')

    i doubt you have a 'Bob' database...

    your example would actually be

    select * where x not in (1,2,3,NULL,NULL) --<<--NOT IN NULL RETURNS...

    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: Only one expression can be specified in the select list error

    you want to test IF EXISTS(any rows in logger2)

    not that (somequery = 0)--you weanted to count the rows or something, right?

    so you'd want to tweak it to something like this:

    IF...

    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 to link two different database as

    damn...i just tried to do it, so i could script out the linked server commands, and i get "cannot create a linked server from a local server" from the gui.

    anyone...

    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 to link two different database as

    In SQl 2000, I can't think of an easy way.

    in SQL 2005, you could use a synonym...for example two synonyms like

    PRIMEDB and OTHERDB

    and the query could refer to

    ...

    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: simple trigger

    well kind of...there is no such thing as a sequence number in SQL, but the Identity() has the equivalent for any given column...if you set the identity() on the column,...

    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: simple trigger

    SQL server is a little bit different than other languages like Oracle.

    there is an Identity() property you can set on a column, which has the same effect that a sequence...

    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: DATEADD with milliseconds

    I personally use the 997 milliseconds, otherwise it;'s the next day.

    SET DATEFIRST 1

    declare @mon datetime,

    @fri datetime

    SELECT...

    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 - 11,536 through 11,550 (of 13,460 total)