Insertar imagenes en sql

Andres Perez 21 Reputation points
2021-11-01T20:06:30.567+00:00

Como puedo insetar imagenes por codigo en sql

insert into Cliente (
ID_DOCU_CLIENTE, NOMBRE, APELLIDO, DIRECCION , TELEFONO, EMAIL, CERTIFICADO)
Select 1032116, 'Carlos Mario', 'Castañeda', 'Cr 45 # 58 -03', 7683420, 'cmcastañeda@Monique gmx .com', BulkColumn FROM Openrowset(
Bulk 'C:\ImagenFichero2.bmp', Single_Blob)

Tengo este codigo y me genera error 145540-imagen.png

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
8,560 questions
No comments
{count} votes

Accepted answer
  1. Christopher Ortiz 151 Reputation points
    2021-11-01T22:01:26.927+00:00

    Hi!
    The error occurred because you forgot to include the correlation name.
    To fix this problem, all we need to do is provide a correlation name (also known as a range variable or alias).

    Example:
    SELECT BulkColumn FROM OPENROWSET (
    BULK '/var/opt/mssql/bak/pets.json',
    SINGLE_CLOB
    ) AS MyAlias;

    No comments

0 additional answers

Sort by: Most helpful