I am trying to insert something into the dbo.Documents table. After the query is run, I can't find the Documents under the TSQL2012 database. I created TSQL2012 for exercise purpose.
I couldn't find the table Documents created in the TSQL2012 database. Please give me some advises on where this table is created. Thanks!
Here is the query:
INSERT INTO dbo.Documents
(title, doctype, docexcerpt, doccontent)
SELECT N'Additivity of Measures',
N'docx',
N'Additivity of measures is not exactly a data warehouse design problem.
However, you have to realize which aggregate functions you will use
in reports for which measure, and which aggregate functions
you will use when aggregating over which dimension.',
bulkcolumn
FROM OPENROWSET(BULK 'C:\Users\admin121\Downloads\9780735666054_Files\Chapter 06\AdditivityOfMeasures.docx',
SINGLE_BLOB) AS doc;
insert into .. select
will copy data to an existing table. Is the tabledbo.Documents
created ? Also what doesselect name from sys objects where name = 'Documents' and type = 'U'
gives ? The table name should be there else it is created in wrong database or it is not created at all.select * from Dcouments
to see if the data is there or not.SELECT '['+SCHEMA_NAME(schema_id)+'].['+name+']' AS SchemaTable FROM sys.tables where name = 'documents'
This will give you schema and table name.