Viewing 15 posts - 3,376 through 3,390 (of 13,462 total)
kish DDL for a table would look more like this, having the compelte datatypes:
what you posted cannot be copied and pasted into SSMS, na dwouldn't help us build a...
May 30, 2013 at 5:57 am
shew (5/30/2013)
May 30, 2013 at 5:51 am
any chance there is a DDL server trigger or extended event doing it?
i've got examples of adding roles to a database automatically if they do not exist,whenever the a...
May 30, 2013 at 5:46 am
there's also several "portable" GUI equivilents of SSMS that would not require an installation;
the one that i keep on my PortableApps is LinqPad http://www.linqpad.net/?
not sure if that is an option...
May 30, 2013 at 5:30 am
if you are going to put the whole path for the executable, i'd suggest actually putting the full name of the executable and also the path to the package; you...
May 30, 2013 at 5:21 am
wow great job providing the setup;
my attempt is adding a rownumber ot partiton by two columns, and joining the results;
does this give you what you were after?
DECLARE @numbers TABLE (number...
May 29, 2013 at 1:29 pm
here;s an example, with 0000 thru ZZZZ as the min/max values:
the first just generates example,s the second makes a calculated column based on the identity value of a table:
SELECT POWER(36,4)...
May 29, 2013 at 12:52 pm
the other option, instead of EXECUTE AS, is to GRANT INSERT ON AuditDatabase.dbo.LogonHist to PUBLIC;
then every user would technically have rights to the table so the trigger can isnert into...
May 29, 2013 at 10:24 am
well if you want to do it via TSQL, look at my script contribution from a while ago;
a couple of procedure sp_GetDDL and sp_getDDLa which scripts any object:...
May 29, 2013 at 10:21 am
not sure what you mean;two different files would require two calls to bcp.
you can call If the startup account for SQL Server is a domain account, you could use a...
May 28, 2013 at 10:20 am
and noting that DEFAULT(0) is just shorthand for creating a constraint might make this more obvious, as well:
ALTER TABLE SomeTable
Add MyColumn int --data type
null --null or not null
default(0)...
May 28, 2013 at 10:03 am
balasach82 (5/28/2013)
IS there a way to use BCP out statement in a single query like (without using xp cmdshell)BCP ... out ....file1.csv
BCP ... out ....file2.csv
bcp is a command line/console application,and...
May 28, 2013 at 9:45 am
pooya1072 (5/28/2013)
i want to add a column to a table with conditions below :
1- it has a default value=0
2- this column can get null value
3- no constraint should be...
May 28, 2013 at 9:24 am
it kind of sounds like you need a calendar table;
that way, you could select every possible date from the calendar table, and then left join it to the data you...
May 28, 2013 at 9:06 am
here's two examples of what Kingston was referring to;
I personally prefer to use the sql server specific metadata, rather than the information_schema, but it's effectively the same thing:
the only reason...
May 28, 2013 at 8:41 am
Viewing 15 posts - 3,376 through 3,390 (of 13,462 total)