Viewing 15 posts - 3,616 through 3,630 (of 13,460 total)
just about everything is an option when it comes to scripting.
in SQL2008 SSMS, go to Tools>>Options>>expand SQL Server Object Explorer>>Scripting.
one of the options is "Script USE <database>
in your case,...
Lowell
April 18, 2013 at 2:37 pm
just double checked, and i can create default constraints, but no check constraints on a table variable:
declare @mytable table
(id int identity(1,1) not null primary key,
name varchar(30) unique,
employee char(1) default...
Lowell
April 18, 2013 at 1:43 pm
you can use a UNC path, assuming permissions for the network are in place:
RESTORE DATABASE MyDatabase FROM DISK='\\LOWELLSMACHINE\c$\SQLBackups\2008Backups\MyDatabase.bak'
Lowell
April 18, 2013 at 1:35 pm
for table variables, you can create unique constraints, but you cannot name them.
i don't think they allow default or check constraints either.
only temp tables or regular tables will allow a...
Lowell
April 18, 2013 at 1:30 pm
sqlfriends (4/18/2013)
The reason I asked this is because we have a view that is...
Lowell
April 18, 2013 at 1:05 pm
you don't have to have a local smtp server; anyones mail server will do, including google, comcast or whoever you have an email account with.;
I've set up google gmail ...
Lowell
April 18, 2013 at 12:33 pm
as an aside, I have not gotten a linked server for access to work in SQL 64 bit / any version; against either a .mdb or .accdb
i can get...
Lowell
April 18, 2013 at 12:31 pm
1. Don't uninstall and then reinstall. that's not going to help resolve the issue, even though it "seems" to.
2. we really need the exact error you get. that tells us...
Lowell
April 18, 2013 at 6:10 am
there is an ISDATE function in SQL as well;
here's an example base don your post:
/*
/*
Eid Variable Date? Converted?
---- --------- ----------- -----------------------
1 ...
Lowell
April 17, 2013 at 2:49 pm
Markus (4/17/2013)
However, I have the trigger selecting the first column in the...
Lowell
April 17, 2013 at 1:06 pm
my version:
note how i provided ready to paste-and-test code for the table and sample data?
if you can do the same in the future, you will get much better, tested answers.
With...
Lowell
April 17, 2013 at 12:52 pm
chris.mcgowan (4/17/2013)
Just create a foreign key between the audit table and source table on that column that will do the trick.Chris
no foreign key for audit tables, usually, in my experience.
...
Lowell
April 17, 2013 at 12:19 pm
if it were me, i would make it like this:
i added an identity, and a column at the end with a default of getdate() so i know when the record...
Lowell
April 17, 2013 at 12:18 pm
CONSTRAINT [PK_JOB_POSTING_AUDIT_1] PRIMARY KEY CLUSTERED
you don't want that;
since this is an audit table, the same pk in the primary table of course would be updated multiple times.
the audit table...
Lowell
April 17, 2013 at 11:57 am
you copied and pasted the exact same description, which apparently i misunderstood the first time.
copying the same thing and pasting it again doesn't help at all.
As I read it, the...
Lowell
April 17, 2013 at 5:49 am
Viewing 15 posts - 3,616 through 3,630 (of 13,460 total)