Viewing 15 posts - 11,881 through 11,895 (of 13,465 total)
thre's two ways to do this;
the sysindexes table has a rowcount column in it, but it is possible that it is not quite accurate; it's a good approximation of the...
November 18, 2008 at 7:07 am
i would think you'd need to add a linked server on washington to point to The california server, and repeat the process on the Cali server to point to washington.
once...
November 18, 2008 at 5:06 am
your psuedocode is pretty much the SQL;
update table2.maj_grp_seq with the table3.maj_grp_seq where table1.mgrp = table3.name.
only thing you are missing is how the data is related to table2; since they...
November 17, 2008 at 5:26 am
you'll be best served if you do this with a full text search.
Believe it or not, it's not that difficult, and there was a recent article here on SSC on...
November 16, 2008 at 6:10 pm
if the table1.Key field should not repeat, why not put a unique constraint on it? why are you trying to do a constraint in a trigger, when there's a built...
November 16, 2008 at 12:24 pm
you have access to that informatino in your exe
in vb6 it's app.path returns the folder the exe is running from
in .NET it's Application.StartUpPath;
it depends on what language you wrote your...
November 14, 2008 at 4:49 pm
on INSERT, of course Columns_Updated returns 3...ALL columns (column 1 and column2 )are affected on INSERT, even if a null gets inserted.....
but if you UPDATE, using jeff's same example,
UPDATE TriggerTest...
November 14, 2008 at 8:43 am
you can't use a variable for an objectname..so you cannot stick something in to replace a tablename or fieldname directly in a statement...you have to use dynamic sql:
fails:
if not exists('select'+@Fieldname...
November 14, 2008 at 6:18 am
--[Inserted] And [Deleted] tables are special virtual tables that contain all the records affected by the insert or delete; it is critical that in a trigger you use a set...
November 14, 2008 at 6:01 am
SELECT
CASE WHEN LEVEL1 = 'PLEASE SPECIFY' THEN '' ELSE LEVEL1 END +
CASE WHEN LEVEL2 = 'PLEASE SPECIFY' THEN...
November 13, 2008 at 11:43 am
i got the same error on one of my databases when i tested your code;
adding collation to the first field fixed it for me:
select 'DROP INDEX ' + object_name(s2.object_id)...
November 13, 2008 at 11:19 am
ok, since it appears the databases exist on the same server, you could do this:
Update DataBase1.dbo.MyTable2 m
SET m.field1 = ##MyTempTable.field1
FROM ##MyTempTable
WHERE m.field2 = ##MyTempTable.field2
Update DataBase2.dbo.MyTable2 m
SET m.field1 = ##MyTempTable.field1
FROM...
November 12, 2008 at 9:27 am
you can get a USB Terabyte and a half external drive for as little as 180 bux; whether you zip/rar an backup, or use a 3rd party tool, tha tmight...
November 12, 2008 at 7:12 am
if the table already exists:
INSERT INTO License_Audit(LicenseType,LICENSECOUNT,AUDITDATE)
SELECT 'MENU',COUNT(USER_ID) AS LICENSE_COUNT ,getdate()
FROM VMFG.dbo.LOGINS
WHERE PROGRAM_ID = 'MENU'
to create the table on the fly:
SELECT 'MENU' AS LicenseType,COUNT(USER_ID) AS LICENSE_COUNT ,getdate() AS AUDITDATE
INTO...
November 12, 2008 at 7:08 am
his query comes from a different system originally, not all dbms can use the UPDATE...FROM syntax, and instead use the style you see here....set somevalue = ([subquery referenncing the updating...
November 12, 2008 at 5:13 am
Viewing 15 posts - 11,881 through 11,895 (of 13,465 total)