Forum Replies Created

Viewing 15 posts - 8,581 through 8,595 (of 13,460 total)

  • RE: Check for field value before attempting to insert row

    also, don't you have to exclude NULLS from the underlying emails if you are using NOT IN:

    INSERT INTO contacts (email, business)

    SELECT email, business

    FROM scrapes

    WHERE (dbo.vaValidEmail(email) = 1)

    AND (NOT email...

    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: Scope of @@rowcount

    GilaMonster (10/12/2010)


    It's more general than that. It's just about every statement.

    SELECT * FROM master.sys.objects -- 74 rows

    IF (1=1)

    SELECT @@ROWCOUNT AS RowsAffected -- 0, because the IF did not affect...

    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 handle string

    not enough info to help so far I think, naresh;

    does your MatchingOff table have 7 columns, or one column with all the values comma delimited?

    you can use a CASE statement...

    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: Scope of @@rowcount

    every insert/update/select/set/delete statement resets the @@rowcount to the rows affected by the executed statement, so it's a best practice to use a variable to capture the rowcount you need,:

    begin

    declare...

    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 can we open a word document thru SQL server 2005 SP

    depends on what you want to do with it; the full text engine has the option to open and index the contents of word and pdf documents for example; 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: Import Oracle table to SQL Server database

    the easiest way would be to use the Import/Export from SSMS; before you can do that, you need to have the ability to connect from the SQL server to the...

    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't compile stored procedure

    you are missing one closing parenthesis just before that END that raises the error.:

    SET @Per = ABS((1.0 * (1-@RN)/(@rows -1)*100)) --<--missing last closing parenthesis...you

    also, in the...

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

    no, but a procedure can.

    a function is not allowed to do DML operations...UPDATE/DELETE...only select, or calculations based on the select.

    a procedure is allowed to update data, and of course 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: Need an alert from a vendor's database when new rows are added

    here's a skeleton to help you visualize.

    I'm assuming:

    1. a tracking table in the MASTER database...not the Vendors database.

    2. a snippet to initialize the data...you have...

    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 an alert from a vendor's database when new rows are added

    i would go with GSquared suggestion of creating a log table, insert how many rows are in the table right now,a nd then have a job compare the current rowcount...

    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: Transfering the Sa password from one server to another

    i see what you were refering to...if you run sp_rev_login with no parameters, every login EXCEPT sa is scripted.

    if you pass a specific login name, it gets scripted if 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: Transfering the Sa password from one server to another

    ???

    EXEC sp_help_revlogin 'sa'

    /* sp_help_revlogin script

    ** Generated Oct 11 2010 12:10PM on DBSQL2K5 */

    -- Login: sa

    CREATE LOGIN [sa] WITH PASSWORD = 0x01004086CEB61FB1FE6C34DEC914CC131938263D12A9FA0B2EF7 HASHED, SID = 0x01, CHECK_POLICY = ON, CHECK_EXPIRATION...

    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: Remove SPID and DomainName from Query Tab in Management Studio

    ahh good job Cory! that's a good to know feature.

    i noticed any changes there affect newly created tabs only...but that's not an issue.

    very nice.

    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: Remove SPID and DomainName from Query Tab in Management Studio

    yeah i don't think the display aspects of the tabs are exposed;

    I see what you are saying, there's filename, server info, login info and spid all in the tab;

    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: Transfering the Sa password from one server to another

    MarvinTheAndriod (10/11/2010)


    Huh? (http://support.microsoft.com/kb/918992/) is sp_help_revlogin. The issue is with regards to transferring the Sa password.

    sp_help_revlogin is a script provided by microsoft which scripts out logins and their passwords as...

    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 - 8,581 through 8,595 (of 13,460 total)