Viewing 15 posts - 346 through 360 (of 1,346 total)
theres no way to do delete all data with on simple command.
But you can use enterprise manager and generate a sql script of all objects tables indexes constraints etc. It...
July 23, 2007 at 9:36 am
Create a Centralized Report database
Make that database your Data Source,
Encapsulate all your query logic within a stored procedure in that database
Use Partitioned Views and or Dynamic Sql to query...
July 6, 2007 at 1:41 pm
http://www.devx.com/tips/Tip/13337
By setting Implicit transaction on, simply executing a statement implies a begin tran. Check out the Article
Prettly clear in
http://msdn2.microsoft.com/en-us/library/ms187807.aspx
I have not experienced an issue with implicit...
June 27, 2007 at 11:59 am
This will give you all orders where there all orderdetails are completed.
Select *
From Orders A
Where not exists (Select *
From OrderDetails B
where a.OrderNum = B.OrderNum
and OrderDetailStatus <> 'completed')
June 26, 2007 at 4:00 pm
declare @foo table (pk int identity,
bar int)
insert into @foo (bar)
select 1 union all
select 2 union all
select 0 union all
select -1 union all
select -4
select *
from @foo
where...
June 14, 2007 at 4:52 pm
Can you please post your proc?
or a similar example,
How is your delete structured?
Just a guess here.
Delete tblAuthors
where authID = @authid
and empid <> (select empid from tbljobs where jobid=6)
It...
June 14, 2007 at 1:42 pm
If you post a sample table and sample data someone could easily help.
How are you inserting the records one at a time?
If you want to create 1000 new records using...
June 14, 2007 at 1:05 pm
Delete what empid?
you may have an issue with this
select authid from tblauthors where empid=(select empid from tbljobs where jobid=6)
because in your subquery if there are more than 1 tbljob...
June 14, 2007 at 1:01 pm
You can do it a couple ways
SELECT COUNT(*)
FROM (SELECT col1 FROM TableA
union
SELECT col1 FROM TableB
union
SELECT col1 FROM TableC) as DerivedTable
OR
SELECT Sum(Number)
FROM (select count(*) as Number from...
June 14, 2007 at 10:20 am
" (assuming it is not correctly secured). "
Well thats the key! No matter what they use if you do not have the databases properly secured then of course they can/will...
June 13, 2007 at 3:03 pm
Try this
select distinct a1.people_code_id
,a1.academic_year
,a1.academic_term
,a1.academic_session
FROM academic a1
WHERE a1.academic_session = 'main'
and a1.academic_term='summer'
and a1.academic_year='2007'
and not exists (select *
FROM academic a2
WHERE a2.academic_session = ''
and a2.academic_term='summer'
and a2.academic_year='2007'
...
June 13, 2007 at 2:57 pm
The short answer is not really.
But as always it depends what your trying to do.
You can pass in XML, and use the sp_xmlpreparedocument, and with.
or you can pass in comma...
June 8, 2007 at 3:06 pm
You have to go through the little wizard excel provides.
Execute excel first.
Then open the .csv file, and it will pop up the little wizard.
There is no way to put the...
May 22, 2007 at 2:43 pm
Check out this post, and subsequent responses
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=169&messageid=300786
May 22, 2007 at 2:41 pm
Your Request does not make sense, 6/6/2079, or 6/6/1979?
anyhooo
Try this.
set nocount on
create table #mydatetable (pk int identity, Mydaveval smalldatetime)
SELECT TOP 20000 nmbr_pk = IDENTITY(int, 1, 1)
INTO #t_Numbers
FROM sysobjects t1, sysobjects...
May 17, 2007 at 4:54 pm
Viewing 15 posts - 346 through 360 (of 1,346 total)