Viewing 15 posts - 31 through 45 (of 110 total)
There are some definite advantages to the single db plan but since you already have that here are some advantages to the multiple db plan:
Another way of saying "everything in...
May 20, 2008 at 8:52 pm
This may work.
Make one new job, call it Job 0. When Job 0 runs all it does is add a new schedule or update existing ones to Jobs 1, 2,...
May 19, 2008 at 6:36 pm
This way, users cannot enter anything directly into column2. Fair warning, there are times when you do NOT want computed columns.
create table ComputedColEx
(
row int identity(1,1),
co11 datetime,
col2 as dateadd(yyyy, 25,...
May 19, 2008 at 5:18 pm
Sounds like you want cascading triggers or Cascading Referential Integrity Constraints. I don't have an example handy. Look at BOL and see if they really are what you want.
May 16, 2008 at 5:23 pm
Can you be more specific? For example, do you want the triggers to fire only when the same thing happens to two tables at the same time? Or, do you...
May 16, 2008 at 5:02 pm
Try IsNumeric().
if isnumeric(@Amount) = 1
begin
Set @AmountFixed = Cast(@Amount as Numeric(12,2))/100
Update #DemoTable set AmountFixed = @AmountFixed where DemoID = @ID
end
else
print 'bad'
The cursor is only for the demo, right? Otherwise, any...
May 16, 2008 at 4:50 pm
That will work.
Do you have to make or use format files too? Be sure they allow for your LoadDate and LoadTime columns. Of course, you could make the table with...
May 8, 2008 at 6:13 pm
You can't bulk insert into table variables. You can bulk insert into local temp tables. That satisfies your multiple simultaneous user requirement.
Will you at least know the names and number...
May 8, 2008 at 6:02 pm
Is there any chance you have 2 databases, one with data and one without, and the job is using the wrong database, most likely master? The posted code does not...
April 23, 2008 at 7:57 pm
select * from #xx
where convert(int, z1) = 1111
and z1 like '%1111'
will not include values like '001001111' and '1111111' because both convert to ints greater than 1111.
Since ishaan99 did not say...
April 22, 2008 at 1:37 pm
Apparently dtblTelephones.Code is the same thing as dtblTechnicians.Country (not obvious by the names). So, all of the country values have to be in the telphones table.
If this is an exceptional,...
April 21, 2008 at 5:38 pm
Try this:
create table #xx (z1 varchar(10))
insert into #xx
select '00070111' union all
select '0001111' union all
select '00000111' union all
select '00040111' union all
select '00044111' union all
select '000001111'
select * from #xx
where convert(int, z1)...
April 21, 2008 at 4:56 pm
Your USE command affects only the dynamic sql's connection so you have to do all of your counting in the dynamic sql. Like this:
USE master
DECLARE @DatabaseName VARCHAR(50)
CREATE TABLE #DatabaseOutput
...
April 18, 2008 at 5:10 pm
What does your execution plan show? Is there an table or index scan on Sales_Summary?
Even though you have an index on each of the filter fields in the fact table...
April 17, 2008 at 6:01 pm
SELECT @TempTable.*, tblServersAddresses.IPAddress
FROM @TempTable
LEFT JOIN tblServersAddresses
ON @TempTable.srvID=tblServersAddresses.srvID
Alias the table variable like this
SELECT tt.*, tsa.IPAddress
FROM @TempTable tt
LEFT JOIN tblServersAddresses tsa
ON tt.srvID=tsa.srvID
April 15, 2008 at 7:40 pm
Viewing 15 posts - 31 through 45 (of 110 total)