Forum Replies Created

Viewing 15 posts - 13,111 through 13,125 (of 13,460 total)

  • RE: Copy all immages out of SQL Server with TextCopy

    this should really be handled by a programming language and not SQL server.

    it's very easy, maybe 15 lines of code to loop thru a recordset and save the image 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: Delete data

    you might want to consider adding a constraint to prevent the data from getting messed up in the future too:

    alter table sometable add constraint UQ_Custnbr_Email unique(Custnbr,  Email)

     

    you'd have to add...

    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: Suppressing Error messages in SP

    like Ken said, if the error is level 16 or above, (foreign key constraint,unique constraint, primary key for example) it cannot be capture via TSQL.

    use a different style of logic...

    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: Getting different results from Query Analyser than Stored Procedure

    i recently had a view that gave different column definitions that if i ran the select portion of the view from getting the select via SP_HELPTEXT viewname.

    as a result, i...

    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: Uninstall of 2005 beta2--ISQLW lost sytax highlighting

    perfect; that's why i love the forums here; somewhere, sometime, someone must have fixed a problem someone else is going to get;

    way to go!

    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 all the db tables to Excel sheet

    you still need to use DTS, but instead of selecting a table, you can choose the second option "Use a query to specify the data to transfer"

    in my example, i...

    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: Get database name for a particular user

    here's noeld's script witht he username pulled out as a parameter:in my example the username is 'hds'; i don't know how this will work for NT logins.

    declare @cmd varchar(300)

    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: I don''''t understand this serror:

    you've got to look at the vb6 code; the issue is that you are referencing an object that hasn't been initialized; for example, if you create an ADODB.Connection but forgot...

    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: Copy Table to Different DB

    here's an idea pending better definition of the WHERE statement: note that everything would be in foreign key hierachy as described previously.

    this assumes that the foreign key column name is...

    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: Copy Table to Different DB

    i've got a decent idea how to do this, but what is your filter criteria?

    i assume it is sometable.columname in(1,2,3) or sometable.columname  < 3000 or something, and you want 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: Get No. of times a colum of a table appears in another table.

    the DDL helps a lot, in this case i think i'd need row values to extrapolate this correctly.

     

    i think this group by statement would give you the question as well...

    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: Errortrap in sp

    error trapping in TSQL is pretty limited;

    if an error is level 16 or above(foreign key constraint violations, primary key, etc), they raise an error that cannot be trapped in TSQL,...

    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: Copy Table to Different DB

    there is a stored procedure you can use to get all the tablenames in hierarchy order.

    here's an example:

    create table #tuser (type int, oname varchar(517), owner varchar(517), seq int)

    insert #tuser exec...

    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 do I query to separate tables?

    you can do it in a single with something like this:

    declare @somekey int

    set @somekey=1

    if exists(select * from ItemTableOne  where someval=@somekey)

    select * from ItemTableOne  where someval=@somekey

    else

    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: Urgent:search for a key word.

    nothing predefined, but you can easily take Tyson's example and create a stored proc witht eh same code.

    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 - 13,111 through 13,125 (of 13,460 total)