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.
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...
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...
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...
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.
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...
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))...
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.
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...
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...
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
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!!
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...
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)...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.