Viewing 15 posts - 3,046 through 3,060 (of 6,036 total)
More universal script:
select *
from master.dbo.SYSREMOTE_TABLES (
'linked_server_name',
NULL,
NULL,
NULL,
NULL )
Works not only on SQL Server remote servers but any kind of remote servers, including ODBC connection to files using Jet.OLEDB driver.
May 14, 2008 at 6:33 pm
UPDATE A
SET ....
FROM TableA A
INNER JOIN TableB B ON B.KeyCol = A.KeyCol
INSERT INTO TableA
(columns list)
SELECT B.Columns list
FROM TableB B
WHERE NOT EXISTS (
select 1 from...
May 13, 2008 at 5:56 pm
Error with severity level 16 raised within a transaction (trigger is always within transaction) will cause rolling it back.
May 13, 2008 at 7:30 am
It must be [Extension]<80, not [Extension]<'80' .
May 13, 2008 at 5:23 am
Jeff, I believe you're ovecomplicationg the problem.
I would suggest:
1) create simple ReportTable
(
SeqNo smallint NOT NULL PRIMARY KEY,
ReportString varchar(8000) NULL
)
2) Populate this table with lines to be reported, lines must...
May 12, 2008 at 11:28 pm
AVB, what if somebody will insert or update more than 1 row?
Any error in further rows will happily bypass your check and end up in the table.
And don't tell me...
May 12, 2008 at 5:34 pm
I support sp_executesql approach.
But the query IMHO is built not in the best way.
I must be like this:
'select count(' + QUOTENAME(@fldname) + ' ) from CONTACT2 '
May 10, 2008 at 2:36 pm
Jeff Moden (5/9/2008)however, sometimes you gotta do what ya gotta do.
Never.
Period.
Unless you're an amateur and don't have plans to become a professional.
What would your car mechanic say if you'd...
May 9, 2008 at 6:07 pm
Who told you that MS SQL Server is a text editor?
Don't trust that person any more. It's not true.
You should chose appropriate task for every job.
To spike with a microscope...
May 9, 2008 at 5:10 pm
AVB (5/9/2008)I guess that's a limitation of a constraint. It applies to all the data.
I guess that's a limitation of a relational database.
Data must be consistent.
May 9, 2008 at 2:56 pm
kevin mann (5/9/2008)
I don't know... ask the authors of Access. I cannot control which identity is returned back to the UI. Or can I?
Returned by what?
May 9, 2008 at 5:59 am
boumerlin (5/8/2008)
The one caveat to this approach is that you have to use a global temp table if you're planning on creating a temp table on the fly and inserting...
May 8, 2008 at 8:08 pm
What are you trying to do?
Concatenate some values to a string?
Then search this forum and/or script section of this site for concatenate function(s), chose the one you like the most.
And...
May 8, 2008 at 5:44 pm
If to add a simple instruction:
SET ANSI_WARNINGS OFF
select
count(*) as theCount,
count(n) as theOtherCount,
avg(n) as theAverage
from
( select 1.0 as n union all
select 3.0 union...
May 7, 2008 at 8:49 pm
Viewing 15 posts - 3,046 through 3,060 (of 6,036 total)