Forum Replies Created

Viewing 15 posts - 6,631 through 6,645 (of 13,460 total)

  • RE: CHARINDEX Not Finding String

    does this return the expected data?

    SELECT

    id,

    SUBSTRING(CONVERT(VARCHAR(max), Data),

    CHARINDEX('<t2>', CONVERT(VARCHAR(max), Data)) + 4,

    ( CHARINDEX('</t2>', CONVERT(VARCHAR(max), Data)) -...

    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: Allowing 1 login to login only once and deny other login attempts

    books online 's first logon trigger example is limiting a login from more than three connections:

    http://msdn.microsoft.com/en-us/library/bb326598.aspx

    make sure you NEVER CLOSE the window you use to create your login trigger during...

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

    laddu4700 (10/3/2011)


    Hi,

    I need to export 9 sql server tables data to pipe delimited text file.

    I tried to use import/export wizard, but I can't export more than one table at 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: Interview question

    patla4u (10/3/2011)


    Hello All,

    I want to know that...if user can insert,update and delete some records and i want to track all information(means user name ,time,which database) then how can i do...

    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: Script that saves results to .txt file or .sql file

    PRINT @teste just before the attempt to bcp. it's probably a single INSERT command, right, and not a whole stack of inserts, because you are not putting your results together...

    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: Script that saves results to .txt file or .sql file

    well to do it exclusively via xp_cmdshell, you've got to have the right command, and it's got limitations.

    the maximum length of the string that you can use at the command...

    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: Script that saves results to .txt file or .sql file

    river1 (10/3/2011)


    The problem is not with the query...

    If i execute the query, it runs well.

    The problem is when o try to save the results to a txt file

    where is 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: Script that saves results to .txt file or .sql file

    change all the snippets like this:

    ...where codrf = (select ...

    --TO

    ...where codrf IN (select ...

    and somewhere in code you did not post, you have something like this:

    ...AND SOMECOLUMN IN= (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!

  • RE: Retrieving BLOB file from DB and save into disk using BCP?

    Tan Hui Siang (10/2/2011)


    Thanks, I'll try.

    Elliot's Project makes the image insertion really simple;

    here's a code example...once you have the CLR in place, it is soooo simple:

    CREATE TABLE myImages(id int,filename...

    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: inserting data into views

    pramany (10/1/2011)


    but i am trying to insert data on multiple base tables in a view.

    in order to insert into that view then, you would have to put an instead of...

    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: TSQL Help

    yes, if you have myproc return a table. so much depends on what "my_proc" actually does.

    CREATE PROCEDURE MyProc @param int

    AS

    BEGIN

    SET NOCOUNT ON

    SELECT ColumnList From SomeTable where...

    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: inserting data into views

    Evil Kraig F (9/30/2011)


    Not entirely true, Gianluca. You just can't update more than one table's columns at a time, which from the error message is what he's trying 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: Trying to avoid RBAR

    Great job psoting sample Data, Kenneth;

    what you are looking for is to use the FOR XML concatination technique.

    based on your sample data, this seems to work perfectly;

    /*

    --Results

    Field ...

    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: Issue sending or receiving email from SQL Server

    MyDoggieJessie (9/30/2011)


    I don't get it...I can't find any errors in the windows event or SQL logs. Everything says successful. Surely there's an error somewhere???

    You're certain the only thing...

    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: Issue sending or receiving email from SQL Server

    MyDoggieJessie (9/30/2011)


    Thanks for the quick reply Lowell...no errors found though...

    Had a brain fart there when I posted my comment about the SMTP service...went into look to check on the SMTP...

    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 - 6,631 through 6,645 (of 13,460 total)