Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. chenthorn

    Moving SQL Databases from one server to another..

    One method that has worked for me in the past is to simply detach the database, copy it over to the destination server, then reattach. this works good if you can handle the downtime while the file copies.
  2. chenthorn

    how tp insert html file into text field

    I want to insert an html file into a text field in my sql table. What is the syntax in doing this? I was trying "insert into blob_test...", but i cannot finish the statement. the file name is blob.html, and I need the entire source code from the html doc inserted into my table. The...
  3. chenthorn

    raid 10 performance vs raid 5

    I have four new dell power edges each with dual xeon 1.8gz processors and 2gb of ram. I have set up the first three servers with a raid 5 data stripe, and the fourth I did a raid 10. I did some benchmarking, and I do not seem to notice any performance difference between the four servers...
  4. chenthorn

    how to truncate table variable

    how does one truncate a table variable inside a function? truncate table doesnt work. do I just set the var to '' and re-declare it? thanks!!
  5. chenthorn

    table function blues! please help!!!!!!

    I have a foxpro .dll that I use via extended stored procedure to scrub addresses in a number of tables. I need to convert this dll to sql so as to improve performance. My first stab was to create a "Multi statement table function". I had hoped that I could select each row from my db...
  6. chenthorn

    SQL 2000 User Defined Functions

    It has always been my experience that you have to place the dbo. in front of the function when used in a select statement, but not when used as a table in the from clause.
  7. chenthorn

    Need to Automate Updates on WEB site

    Are you wanting to delete ALL records in your table 1 & table 2? if so, you can use an 'Execute SQL Task' in DTS to perform TRUNCATE TABLE <Table1>, perform a data pump from your access db into your table, then perform another 'Execute SQL Task' to truncate your other table, and use a third...
  8. chenthorn

    subquery in the from clause?

    Here is the declare cursor statement that I would like to work: DECLARE X_cursor CURSOR scroll FOR SELECT LTRIM(RTRIM(a.CONTCT)), LTRIM(RTRIM(a.CONAME)), LTRIM(RTRIM(a.STREET)), LTRIM(RTRIM(a.SUFFIX)), LTRIM(RTRIM(a.DIRIND)), LTRIM(RTRIM(a.POSDIR)), LTRIM(RTRI(a.PRMNUM))...
  9. chenthorn

    subquery in the from clause?

    I tried going down this road before. If I alias the subselect, I have to also alias each column name. When I do this, I get the following error: Server: Msg 207, Level 16, State 3, Line 1 Invalid column name 'CONTCT'... I dont know that this is the answer.
  10. chenthorn

    subquery in the from clause?

    Iam building a cursor on the result set of this query. i dont want to build this into a dynamic string due to the size of the cursor and the number of columns that i would have to code. I will if I have to, but I am looking for better ways. When I run the sproc that this query lives in, I have a...
  11. chenthorn

    subquery in the from clause?

    I have a select statement that grabs 36 columns from my 40 column table in order to build a cursor on them so that I may compare each field to another table in order to prevent duplicate data from being inserted. Although slow, this process works fine when I only want to check one file at a...
  12. chenthorn

    insert triggers urgent

    try this: CREATE TRIGGER TRGname ON table_name FOR INSERT AS declare @old int, @new int select @old = recordid from inserted select @new = @old+1 update table_name set recordid = @new where Recordid = @old
  13. chenthorn

    insert triggers urgent

    Please do not use a trigger to do this. An identity column would work better, and makes the trigger unnecesary. see BOL.
  14. chenthorn

    ?? Way to backup schema only ??

    Is there a way to only back up the data objects (schema) in a database, not the data itself? via BACKUP DATABASE? I have been generating the sql code for my views, tables, etc, but was wondering if there was an easier way to save all that info into source safe. Thanks!!
  15. chenthorn

    getting fields of tables

    IN psudo-code, here is one way to do this: 1) create a table with all the servers and their databases you want to check on one server 2) create linked servers to each. 3) build cursor on server table, running query that will join target server's sysobjects table to syscolumns table on ID column...
  16. chenthorn

    Dynamic strings &amp; variables

    Why can I not pass the results of a dynamic string query straight into a variable? I have this query to find the max uid for a givern job run. I paramaterized the server name so that the table can be moved between servers for disaster recovery: declare @destsvr varchar(30), @file varchar(30)...
  17. chenthorn

    ***Null value vs Empty String***

    Please help settle a rather heated argument. Which would take up less space in a database table, a Null value, or an Empty String (ie. ' ')?
  18. chenthorn

    Help with Bulk Insert FieldTerminators!!!

    I have a 38 column table that I am trying to write a sproc that will insert a text file into it. I have been doing this via dts, but want to do it in tsql. The text data looks like this...

Part and Inventory Search

Back
Top