Use MASTER
GRANT EXECUTE ON SYS.XP_PROP_OLEDB_PROVIDER TO public
Category Archives: MsSQL
OPENQUERY – MsSQL
Select :
select * from OPENQUERY ( KOOP_GOLEM_PROVOZ, ‘select * from zdrojova_tabulka_v_IFX’)
Kopie :
select * into cilova_tabulka from OPENQUERY ( IFX, ‘select * from zdrojova_tabulka_v_IFX’)
Kopie tabulky
# IFX to MsSQL
select * into CILOVA_TABULKA from OPENQUERY( DB_LINK, ‘select * from poji.ZDROJOVA_TABULKA’)
# MsSQL to MsSQL
SELECT * INTO CILOVA_TABULKA FROM ZDROJOVA_TABULKA
Struktura tabulek do tabulky
# Vytvoření tabulky :
Create table sloupce
(TABLE_QUALIFIER varchar(40),
TABLE_OWNER varchar(20),
TABLE_NAME varchar(40),
COLUMN_NAME varchar(40),
DATA_TYPE int,
TYPE_NAME varchar(20),
PREC int, LENGTH int,
SCALE int, RADIX int,
NULLABLE char(4),
REMARKS varchar(128),
COLUMN_DEF varchar(40),
SQL_DATA_TYPE int,
SQL_DATETIME_SUB int,
CHAR_OCTET_LENGTH int,
ORDINAL_POSITION int,
IS_NULLABLE char(4),
SS_DATA_TYPE int);
# Přidání tabulky :