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 | Other
0 comments No comments
{count} votes

Answer accepted by question author
  1. Anonymous
    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;

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.