Forum Replies Created

Viewing 15 posts - 136 through 150 (of 196 total)

  • RE: Data Export/Import Using T-SQL

    Hello Satya,

    There are several ways to do what you ask.

    One way is to set up a linked server and use a statement something like the following:

    insert into tablename (column1, column2) select...

  • RE: How to padleft in T-SQL

    Hi Frank,

    This situation comes up frequently in the U.S. where personal identification numbers assigned by the government (social security numbers) are always nine digits, and may begin with a zero.  The...

  • RE: @@LINENUMBER ???

    I am not aware of any function built in to SQL Server that will provide what you are asking for. 

    However, a line number typically is only useful to the...

  • RE: Error With BCP

    The content of the table should not make a difference.  However, the owner of the table certainly could.  Check the spelling of the table name that fails (seems to obvious,...

  • RE: Error With BCP

    re: the permissions problem: The environments I work in tend to be fairly well locked down (not my doing - just good network folks in the ops team).  As an...

  • RE: Count Individual Words in freetext fields

    A simple, brute force strategy would be to write a parser to read each NOTES and split the words into a single vertical table.  Then simply run a count for...

  • RE: Error With BCP

    I have had similar problems in the past with two different causes.

    In one case, the acocunt I was running as did not have priveleges on the target drive.  Check with...

  • RE: Need to seperate string in two columns using T-SQL

    create table testtable (Col1 varchar(50), Col2 varchar(50), Col3 varchar(50))

    go

    insert into testtable (Col1)

    SELECT 'Americas - NorthEast'

    UNION

    SELECT 'Americsa - SouthEast'

    UNION

    SELECT 'Europe - North Region'

    UNION

    SELECT 'Asia - SouthEast'

    GO

    SELECT * FROM TESTTABLE

    update testtable

       SET...

  • RE: "best" way to implement multi-user query

    Thanks all for the good thinking so far.  Comments follow:

    Sukhio: Suppose that instead of colors, the actual data is a bank account number being assigned to a new customer.  Having...

  • RE: How Can I Select All But One Record?

    Without checking the orignal data, I cannot be certain.  However, my first thought would be that there was a case of three rows instead of just the two you expected. ...

  • RE: How Can I Select All But One Record?

    Assuming that the column EnRID is a unique row id, try this:

    UPDATE Enrollment SET ISMID = NULL

     WHERE Enrid IN (SELECT MIN(E.ENRID)

                         FROM ENROLLMENT E INNER JOIN

                                         (SELECT ismid, Mydate

                                           ...

  • RE: Selecting Max Sum?

    More than happy to help with tuning.  Please post it here as the collective braintrust has a lot of fun with these things.

    Wayne

  • RE: Selecting Max Sum?

    For the curious, this is the practice site mentioned in the post: http://www.sql-ex.ru/?Lang=1

    Regarding the problem mentioned, consider selecting the max from a derived table.  Details are left to the...

  • RE: Saving a mail to a file

    G'Day,

    Assuming

    a) that you are able to store the mail as text (not a direct binary mail file), and

    b) that text you wish to store can be retrieved via...

  • RE: Very basic question - Insert or Update?

    hmmm.  It seems we have made the original question a little broader by introducing the related issues of reliability and atomicity.  Dare I suggest we might consider a transaction wrapping the...

Viewing 15 posts - 136 through 150 (of 196 total)