Forum Replies Created

Viewing 15 posts - 5,776 through 5,790 (of 13,460 total)

  • RE: Script Out Database Mail Settings?

    Mandeep Dulai (3/16/2012)


    Excellent script! Currently migrating to a new SQL Server and this has saved me a ton of time. Thank you!

    glad it helped you out!

    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: columns of the primary key of all tables of all schemas

    start with sys.indexes, and you have to join sys.index_columns and sys.columns

    select

    object_name(IDX.object_id),

    IDX.name,

    cols.name,

    * from sys.indexes IDX

    INNER JOIN sys.index_columns IXCOLS

    ON IDX.[object_id] = IXCOLS.[object_id]

    AND IDX.[index_id] ...

    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: SQL 2008R2 - ODBC cannot connect

    is the server an express instance , where remote connections are not enabled by default?

    is it the default instance or a named isntance, and is the SLq broswer service running?

    from...

    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: mySQL and not SQL2008?

    it looks to me like the cost of SQL Server 2008 starts at around $3,000 dollars...well maybe 6K for a dual proc multi core, 12k for a Quad Proc multi...

    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: defaut

    weston_086 (3/15/2012)


    Is this possible that i can have in this format 12/31/2099 .if we will do like

    ALTER TABLE [dbo].[test] ADD DEFAULT ((convert(int,convert(datetime,'12/31/2099')))) FOR [id]. it will set default...

    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: .asc file to .txt file

    asc files are just plain old text files. open them up in notepad...you'll see the extension doesn't matter, the contents are plain text, the same way .txt files are.

    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: defaut

    well, you should store dates in datetime columns. you end up wasting a lot of time converting int values to dates and back again when it is not...

    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: Need separeta last, first and midin from full name

    well in theory, you split the column on the space betwen the words...

    but the issue is, "you cannot tell the which is the "middle" name between "James Tiberius Kirk" and...

    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: can any just help me to get a loop structure for this query?

    my version, which accepts a dynamic number of words, splitting them by the space between words:

    CREATE PROCEDURE [dbo].[CategoryName] @SEARCHSTRING varchar(1000)

    AS

    DECLARE @COLUMNNAME VARCHAR(128),

    ...

    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 use like operator for this store proc or any other method?

    Lynn Pettis (3/15/2012)


    SQLKnowItAll (3/15/2012)


    Lowell (3/15/2012)


    duplicate post.

    no need to cross post to multiple forums it fractures the answers you get and makes posters duplicate others work.

    the "Recent Posts" link shows us...

    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 use like operator for this store proc or any other method?

    sorry gang, link is fixed.

    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 use like operator for this store proc or any other method?

    duplicate post.

    no need to cross post to multiple forums it fractures the answers you get and makes posters duplicate others work.

    the "Recent Posts" link shows us everything.

    continue the thread here:

    http://www.sqlservercentral.com/Forums/Topic1267763-391-1.aspx

    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: can any just help me to get a loop structure for this query?

    i've done what you are asking in another post...if you followed the netiquette, as ColdCoffee suggests, I probably would have posted the solution.

    in the meantime, if you search the forums...

    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: Hide all system views/tables from users in SQL server 2005

    there's a number of threads here on SSC where the requirement is to remove public permissions in order to comply and lock down a SQL server to DoD standards (google...

    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: Trigger

    first, you don't need a trigger...you could simply add a check constraint to prevent that.

    ALTER TABLE product1 ADD CONSTRIANT CK_COST_VS_SELL CHECK(costprice <= sellingprice)

    your trigger assumes only one row being inserted,...

    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 - 5,776 through 5,790 (of 13,460 total)