Monday, March 26, 2012
Image size
possible to write a query that shows the size of the file being stored ?
Any help would be great.
Thanks
SiYou can get the bytes used with DATALENGTH -
SELECT DATALENGTH(YourImageColumn)
FROM YourTable
You can find more information on DATALENGTH in Books Online.
-Sue
On Mon, 31 Jul 2006 08:36:01 -0700, Simon
<Simon@.discussions.microsoft.com> wrote:
>I have a SQL database that stores image files (pdf, doc, tif etc). Is it
>possible to write a query that shows the size of the file being stored ?
>Any help would be great.
>Thanks
>Si
Image size
possible to write a query that shows the size of the file being stored ?
Any help would be great.
Thanks
SiYou can get the bytes used with DATALENGTH -
SELECT DATALENGTH(YourImageColumn)
FROM YourTable
You can find more information on DATALENGTH in Books Online.
-Sue
On Mon, 31 Jul 2006 08:36:01 -0700, Simon
<Simon@.discussions.microsoft.com> wrote:
>I have a SQL database that stores image files (pdf, doc, tif etc). Is it
>possible to write a query that shows the size of the file being stored ?
>Any help would be great.
>Thanks
>Si
Monday, March 12, 2012
I'll be posible process a bulk load for following xml document?
the xml doc is:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xs:element name="entity" sql:relation="ENTITY">
<xs:complexType mixed="true">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="entity"/>
</xs:sequence>
<xs:attribute name="name" use="required" sql:field="NAME"/>
<xs:attribute name="descripcion" use="required" sql:field="DESCRIPCION"/>
<xs:attribute name="address" use="required" sql:field="ADDRESS"/>
</xs:complexType>
</xs:element>
<xs:element name="entities" sql:is-constant="1">
<xs:complexType>
<xs:sequence>
<xs:element ref="entity" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
the table is:
TABLE [dbo].[ENTITY](
[ENTITYNAME] [varchar](50) NULL,
[ENTITYDESCRIPCION] [varchar](200) NULL,
[ENTITYADRESS] [varchar](50) NULL,
) ON [PRIMARY]
GO
SOMEBODY COULD DO IT ?
Yes this shape would be possible to bulkload. However the column names you have specified with sql:field do not match the columns in the database, so if you are having trouble with this schema, that might be one possibility.
<xs:attribute name="name" use="required" sql:field="NAME"/>
<xs:attribute name="descripcion" use="required" sql:field="DESCRIPCION"/>
<xs:attribute name="address" use="required" sql:field="ADDRESS"/>
look like they should be:
<xs:attribute name="name" use="required" sql:field="ENTITYNAME"/>
<xs:attribute name="descripcion" use="required" sql:field="ENTITYDESCRIPCION"/>
<xs:attribute name="address" use="required" sql:field="ENTITYADRESS"/>
-Todd
I'll be posible process a bulk load for following xml document?
the xml doc is:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xs:element name="entity" sql:relation="ENTITY">
<xs:complexType mixed="true">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="entity"/>
</xs:sequence>
<xs:attribute name="name" use="required" sql:field="NAME"/>
<xs:attribute name="descripcion" use="required" sql:field="DESCRIPCION"/>
<xs:attribute name="address" use="required" sql:field="ADDRESS"/>
</xs:complexType>
</xs:element>
<xs:element name="entities" sql:is-constant="1">
<xs:complexType>
<xs:sequence>
<xs:element ref="entity" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
the table is:
TABLE [dbo].[ENTITY](
[ENTITYNAME] [varchar](50) NULL,
[ENTITYDESCRIPCION] [varchar](200) NULL,
[ENTITYADRESS] [varchar](50) NULL,
) ON [PRIMARY]
GO
SOMEBODY COULD DO IT ?
Yes this shape would be possible to bulkload. However the column names you have specified with sql:field do not match the columns in the database, so if you are having trouble with this schema, that might be one possibility.
<xs:attribute name="name" use="required" sql:field="NAME"/>
<xs:attribute name="descripcion" use="required" sql:field="DESCRIPCION"/>
<xs:attribute name="address" use="required" sql:field="ADDRESS"/>
look like they should be:
<xs:attribute name="name" use="required" sql:field="ENTITYNAME"/>
<xs:attribute name="descripcion" use="required" sql:field="ENTITYDESCRIPCION"/>
<xs:attribute name="address" use="required" sql:field="ENTITYADRESS"/>
-Todd