Viewing 15 posts - 12,961 through 12,975 (of 13,469 total)
usually, you get a collection of rows from the datatable, and loop thru the rows:
Dim
dt As DataTable
Dim
a()
October 24, 2006 at 6:19 am
there's pretty much only two ways; setting up a trace, which you stated you wanted to avoid;
you'd need to set up a trace to capture TSQL statement completed, and then...
October 20, 2006 at 12:37 pm
Greg's example is actually a bit better;
your example script would work, but it would always say 50000 rows affected, as there is no where clause. with no where clause,...
October 20, 2006 at 9:53 am
constraints are enforced acrross all data in the table, and there's no conditional constraints.... so you can't have a constraint Client_id and Code_id where isactive_flag = 'N' and a different...
October 19, 2006 at 7:21 am
Rgr is absolutely right....if you had a stored proc that was 30K in length, it would just occupy 7 rows in the syscomments table(30K /4K = 7 rows)
your boss on high...
October 19, 2006 at 6:02 am
and to expand on what Ken said, if the table doesn't exist yet, you can use the INTO command to create it on the fly:
SELECT Col1, Col2, ...
INTO MyNewTable
FROM YourView
October 18, 2006 at 11:12 am
From what you stated, I think I'd add a linked server for the Pervasive database, then write a procedure to grab the data from the ERP/Pervasive database, and insert that...
October 18, 2006 at 11:05 am
something like:
CREATE TRIGGER tr1 ON Transactions
AFTER INSERT,UPDATE AS
INSERT INTO TransactionLog(TransactionID, TransactionStatusCode, LogDate, ErrorCode, Comments )
--the table [INSERTED] is the data being affected by insert/update:
SELECT TransactionID, TransactionStatusCode, LogDate, ErrorCode, Comments FROM...
October 18, 2006 at 9:23 am
i'm assuming you want the trigger to insert data that is placed in an SQL table to also be propigated to a non-SQL table; you know that the virtual table[INSERTED]...
October 18, 2006 at 9:13 am
I think you'll want to avoid any functions like CONVERT and CHARINDEX in your joins/where clauses, as that requires a full table scan in order to get the data so...
October 17, 2006 at 1:01 pm
here's a simple example: assuming ('TBSTATE','TBSTATE','TBCOUNTY') is the lookup tables that should not be deleted
declare @level tinyint
set @level = 0
create table #tables (
id int not null primary...
October 17, 2006 at 8:13 am
i think id' try to use a subselect and max function:
SELECT PKColumn,othercolumns,MAX(DerivedDate) from
sometable
left outer join
(select PKColumn,DateColumn1 as DerivedDt from sometable UNION
select PKColumn,DateColumn2 as DerivedDt from sometable UNION
select PKColumn,DateColumn3 as DerivedDt...
October 17, 2006 at 8:07 am
Big Brother® is a Web-based systems and network monitor. A universal color-code interface of "red is bad and green is good" allows anyone to measure the health of a network...
October 17, 2006 at 8:02 am
i'd speculate that someone tried to truncate a table that was referenced by a foreign key, got an error, and assumed that it was not supported;
truncate table deletes all the...
October 5, 2006 at 7:29 am
to really help, we'll need the real schema; use enterprise manager, select the table, right click>>All Tasks>>Generate SQL Scripts
paste the results here;
you can join the same table on itself when you...
October 4, 2006 at 1:21 pm
Viewing 15 posts - 12,961 through 12,975 (of 13,469 total)