Viewing 15 posts - 4,561 through 4,575 (of 13,469 total)
sql-lover (10/18/2012)
Cannot insert explicit value for identity column in table 'MyTable_A'...
October 18, 2012 at 3:01 pm
ok i can do an instead of trigger;
here's a simple version of your example:
note how the isnerts into Table_A ignore whatever was passed for the c2 column
CREATE TABLE dbo.MyTable_A
(
...
October 18, 2012 at 2:16 pm
well, you identified the fix: creating an INSTEAD OF TRIGGER on the view, that inserts the data into the "right" table.
but if you don't want to use a trigger, then...
October 18, 2012 at 1:33 pm
a couple of prerequisites:
install the AccessDatabaseEngine_x64.exe from microsoft:
http://www.microsoft.com/en-us/download/details.aspx?id=13255
make sure you open an Administrative command prompt window, and run it with the c:\Downloads\AccessDatabaseEngine_x64.exe /passive
command line flag;
this will force the...
October 18, 2012 at 1:02 pm
I'm not going to explain why something doesn't work, but i will show you how i handle it.
SSMS has the ability to call keyboard shortcuts, which call a procedure of...
October 18, 2012 at 12:53 pm
i only had 7 csv files, but this seemed to work just fine:
note i'm assuming multiple directories as well for the csv files.
uncomment out the "--exec(sql) if you are ready...
October 18, 2012 at 12:24 pm
ok a tiny bit of research, and i can openquery csv files with this command on either my 2008R2 or 2012 instances:
SELECT *
FROM OPENROWSET('MSDASQL',
...
October 18, 2012 at 12:18 pm
Howard do all the files have header data as the first row?
i used to be able to do this with the Jet 32 but engine, creating the table on the...
October 18, 2012 at 12:01 pm
ALTER TABLE SomeTable ADD CONSTRAINT UQ_Firstname_lastname_Birthdate UNIQUE (Firstname,lastname,Birthdate)
October 18, 2012 at 10:44 am
the scriptlet i posted is what i've put in a scheduled job before;
just letting it run once a day deletes anything older than 30 days;
that's what would be my simple...
October 18, 2012 at 7:52 am
if you know the traceId(select * from sys.traces) , you can import it into a table, or create a view for it, all from within TSQL, so you probably do...
October 17, 2012 at 2:47 pm
if you look at your code, you have two other variables that have not been declared as parameters:
@NEW_ACCOUNT_ID
@NEW_MSISDN
you did declare @Val1 and @Val2 already;
to me it looks like you did...
October 17, 2012 at 1:43 pm
jason if you sp_helptext sysmail_delete_mailitems_sp in the msdb database,
you'll see it's using a catch-all query to delete fromt eht able, and only one table;
after a bunch of error checking, this...
October 17, 2012 at 11:09 am
I had to deploy a CLR similar to this issue once; it used a "custom" flavor/implementation of an AES-like encryption that was almost, but not the same as, a true...
October 17, 2012 at 8:36 am
Viewing 15 posts - 4,561 through 4,575 (of 13,469 total)