Viewing 15 posts - 841 through 855 (of 907 total)
Print out your dynamice sql string just prior to having it executed. Take that string and try to run it in QA. Sound like your dynamic SQL is...
September 11, 2002 at 9:43 am
That's what I thought, just wanted to confirm. Thank you for the information.
-------------------------
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples
September 11, 2002 at 8:15 am
Straight from BOL (see below). Also if I remember correctly you can drop the clustered index, and then recreate it on the new filegroup. This will move the...
September 10, 2002 at 5:52 pm
Here is one that is works a little better:
ALTER procedure proc_name
@name as char(30),
@address as char(30),
@date datetime
as
declare @cmd varchar(100)
set @cmd = 'insert into mytable ' +
...
September 10, 2002 at 5:35 pm
You need to build some dynamic sql. Try something like this:
create procedure proc_name
@name as char(30)
@address as char(30)
@date datetime
as
declare @cmd varchar(100)
set @cmd = 'insert into mytable ' +
...
September 10, 2002 at 5:26 pm
One way to accomplish this is to create dynamic sql that is sets a local variable via sp_executesql using the out parm, then use that variable in the next dynamic...
September 10, 2002 at 5:19 pm
See I told you there was an easier way, then my method. Thanks Diane
-------------------------
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples
September 10, 2002 at 5:03 pm
Here is one way but not very simple. I'm guessing there is an easier way:
-- What is the database name?????
create table #tmp_sfs (
fileid int,
filegroup int,
...
September 10, 2002 at 4:55 pm
Provided the user is running the select query as part of some batch of code, like a SP, then you could use something like this to capture the user connection...
September 10, 2002 at 3:13 pm
Possible Log Explore by Lumigent might work for you. I have not used the tool, but I'm sure someone might know whether it can do what you are asking....
September 10, 2002 at 2:41 pm
This example worked for me. I'm wondering what value you might have in your varchar(12) column. Would you send a couple of values that don't work?
declare @date_closed_date as...
September 10, 2002 at 2:28 pm
Here is a recursive procedure I wrote to calculate a factorial. You might be able to try something like this:
http://www.geocities.com/sqlserverexamples/#math1
-------------------------
Gregory Larsen, DBA
If you looking for SQL Server Examples check...
September 10, 2002 at 2:19 pm
From this thread looks like there are no worries about changing IP address for W2K servers, what about 7.0 servers?
We are moving to a new building and will need to...
September 10, 2002 at 1:47 pm
Here is an example that will do that:
-- this example shows a method to get rid of duplicates in a table
create table temp_table (a char(1))
insert into temp_table values('a')
insert into temp_table...
September 10, 2002 at 10:34 am
Possibly then you could try something like this:
Create table yyy(x char(1), y char(1), z char(1)
primary key (x,y))
create table ddd(x char(1), y char(1), z char(1))
insert into yyy values('A','B','C')
insert into ddd...
September 10, 2002 at 10:24 am
Viewing 15 posts - 841 through 855 (of 907 total)