Oracle, equivalent to the SQL SERVER CLRClipString function
Hello friends,I am running the following sql query in SQL SERVER successfully...
Select * from
CLRSplitString ('33, 54, 105, 148, 149, 163, 165, 179, 193, 195, 201, 202, 234, 239, 279, 282, 297, 299, 329, 332, 350, 415, 417, 439, 440, 500, 552, 570, 589, 603, 628, 655', ", ',') x
Join dbo. PART_ADDL_INFO_NAMES_V v x.col1 = v.addl_info_name_id
I would like to implement the same ORACLE sql statement.
I created the function that takes the comma-separated string and display as a single column... I want emerging in oracle as a sql statement...
create or replace function str2tbl
(p_str in varchar2)
p_delim in varchar2 default '.')
return myTableType
as
long l_str p_str default. p_delim;
number of l_n;
myTableType l_data: = myTabletype();
Start
loop
l_n: = instr (l_str, p_delim);
When the output (nvl(l_n,0) = 0);
l_data.extend;
l_data (l_data.count): = ltrim (rtrim (substr(l_str,1,l_n-1)));
l_str: = substr (l_str, l_n + length (p_delim));
end loop;
L_data return;
end;
/
DECLARE
v_array mytabletype;
BEGIN
v_array: = str2tbl ('10.01.03.04.234');
BECAUSE me in 1... v_array. COUNTING LOOP
DBMS_OUTPUT. Put_line (v_array (i));
END LOOP;
END;
/
10
01
03
04
234
appreciate your help...
Thank you
If you need to split a single string:
with t as (
select '33,54,105,148,149,163,165,179,193,195,201,202,234,239,279,282,297,299,329,332,350,415,417,439,440,500,552,570,589,603,628,655' str from dual
)
select regexp_substr(str,'[^,]+',1,level) sub_str
from t
connect by level <= regexp_count(str,',') + 1
/
SUB_STR
-------------------
33
54
105
148
149
163
165
179
193
195
201
SUB_STR
-------------------
202
234
239
279
282
297
299
329
332
350
415
SUB_STR
-------------------
417
439
440
500
552
570
589
603
628
655
32 rows selected.
SQL>
SY.
PS REGEXP_COUNT is available in 11g only. If you are using 10g:
with t as (
select '33,54,105,148,149,163,165,179,193,195,201,202,234,239,279,282,297,299,329,332,350,415,417,439,440,500,552,570,589,603,628,655' str from dual
)
select regexp_substr(str,'[^,]+',1,level) sub_str
from t
connect by level <= length(regexp_replace(str,'[^,]')) + 1
/
Tags: Database
Similar Questions
-
Problem establish Oracle Database Gateway for SQL Server
I configured dblink between Oracle and SQL Server by using the 'Oracle Database Gateway for SQL Server' method.
I use dg4odbc and freetds, suite Doc-ID 561033.1 .
I have my isql and osql works correctly, tsql.
But get below error when query any table/column of Oracle sql * for the sql server database.
Select subscription_type in Address@ITSMSP;
ORA-28511: lost RPC connection to heterogeneous remote agent using SID = ORA-28511: lost CPP
connecting to heterogeneous remote agent to help
SID = (Description = (Address = (Protocol = TCP)(Host=localhost) (port = 1522)) (CONNECT_DATA = (SID = ITSM-Prod)))
ORA-02063: preceding the line of ITSMSP
As per below track appears after the connection is a failure.
I get this error with each table or column selection.
I already prepare DBlink user id and password with the double quotes and link with the apostrophe.
One thing surprised me when I close my session it request commit or rollback.
Although I don't do anything except select.
I already tried by setting autocommit on, but still getting the same error.
We create the oracle for sql server before database gateway. This time, few things are different:
1. the name of the server (on sql server database) contains a '-' hyphen.
2. name of database server Sql contain also one '-' hyphen.
2 sql database server for windows 64 - bit OS, prior, we used 32 bits.
Please let me know if anyone set the Oracle database gateway using dg4odbc and freetds to sql server where the database of sql server resident in 64-bit windows machine.
Here's the snapshot trace: remove the server name with *.
Oracle Corporation - Tuesday 2 April 2013 21:15:38.096
Heterogeneous Agent release
11.2.0.3.0
Oracle Corporation - Tuesday 2 April 2013 21:15:38.096
Version 11.2.0.3.0
Hgogprd entries
HOSGIP to 'HS_FDS_TRACE_LEVEL' returned '4 '.
Hgosdip entries
default assignment of 50 HS_OPEN_CURSORS
setting HS_FDS_RECOVERY_ACCOUNT or 'RECOVER '.
HS_FDS_RECOVERY_PWD layout to the default
default HS_FDS_TRANSACTION_LOG of HS_TRANSACTION_LOG layout
HS_IDLE_TIMEOUT layout to the default 0 value
layout by default HS_FDS_TRANSACTION_ISOLATION of "READ_COMMITTED".
layout by default «AL32UTF8» HS_NLS_NCHAR
layout HS_FDS_TIMESTAMP_MAPPING default 'DATE '.
layout HS_FDS_DATE_MAPPING default 'DATE '.
layout HS_RPC_FETCH_REBLOCKING failure to 'ON '.
HS_FDS_FETCH_ROWS layout without '100 '.
parameter HS_FDS_RESULTSET_SUPPORT default 'FALSE '.
parameter HS_FDS_RSET_RETURN_ROWCOUNT default 'FALSE '.
parameter HS_FDS_PROC_IS_FUNC default 'FALSE '.
parameter HS_FDS_MAP_NCHAR if there is no 'TRUE '.
setting HS_NLS_DATE_FORMAT or 'YYYY-MM-DD HH24:MI:SS ".
parameter HS_FDS_REPORT_REAL_AS_DOUBLE default 'FALSE '.
HS_LONG_PIECE_TRANSFER_SIZE layout without "65536".
parameter HS_SQL_HANDLE_STMT_REUSE default 'FALSE '.
parameter HS_FDS_QUERY_DRIVER if there is no 'TRUE '.
HOSGIP returned the value 'FALSE' to HS_FDS_SUPPORT_STATISTICS
parameter HS_FDS_QUOTE_IDENTIFIER if there is no 'TRUE '.
setting in HS_KEEP_REMOTE_COLUMN_SIZE if 'OFF '.
parameter HS_FDS_GRAPHIC_TO_MBCS default 'FALSE '.
parameter HS_FDS_MBCS_TO_GRAPHIC default 'FALSE '.
Default value of 64 assumed for HS_FDS_SQLLEN_INTERPRETATION
HS_CALL_NAME_ISP layout "gtw$: SQLTables; GTW$: SQLColumns. GTW$: SQLPrimaryKeys. GTW$: SQLForeignKeys. GTW$: SQLProcedures. GTW$: SQLStatistics; "gtw$: SQLGetInfo.
parameter HS_FDS_DELAYED_OPEN if there is no 'TRUE '.
HS_FDS_WORKAROUNDS layout by default "0".
Release of hgosdip, rc = 0
ORACLE_SID is ' *-* '.
Product information:
Port RLS / Upd:3 / 0 PrdStat:0
Agent: Oracle Database Gateway for ODBC
: Installation
Class: ODBC, ClassVsn:11.2.0.3.0_0011, Instance: *-*.
Release of hgogprd, rc = 0
Hgoinit entries
HOCXU_COMP_CSET = 1
HOCXU_DRV_CSET = 31
HOCXU_DRV_NCHAR = 873
HOCXU_DB_CSET = 873
HS_LANGUAGE is american_america.we8iso8859p1
LANG is en_US. UTF-8
HOCXU_SEM_VER = 112000
Entry hgolofn to 2013/04/02-21: 15:38
HOSGIP to 'HS_FDS_SHAREABLE_NAME' returned ' / usr/lib64/libodbc.so '.
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLAllocHandle
symbol_peflctx = 0x2ca08300
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLBindCol
symbol_peflctx = 0x2ca08390
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLBindParameter
symbol_peflctx = 0x2ca08b50
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLCancel
symbol_peflctx = 0x2ca09dc0
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLDescribeParam
symbol_peflctx = 0x2ca11890
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLDisconnect
symbol_peflctx = 0x2ca11d30
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLEndTran
symbol_peflctx = 0x2ca14580
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLExecute
symbol_peflctx = 0x2ca15a20
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLFetch
symbol_peflctx = 0x2ca16220
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLFreeHandle
symbol_peflctx = 0x2ca17c40
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLFreeStmt
symbol_peflctx = 0x2ca17c60
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLGetData
symbol_peflctx = 0x2ca19370
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLGetEnvAttr
symbol_peflctx = 0x2ca1c4f0
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLGetFunctions
symbol_peflctx = 0x2ca1c890
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLMoreResults
symbol_peflctx = 0x2ca1e330
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLNumResultCols
symbol_peflctx = 0x2ca1ef80
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLParamData
symbol_peflctx = 0x2ca1f280
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLPutData
symbol_peflctx = 0x2ca210b0
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLRowCount
symbol_peflctx = 0x2ca21480
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLSetEnvAttr
symbol_peflctx = 0x2ca22fc0
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLSetDescRec
symbol_peflctx = 0x2ca22e10
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLColAttribute
symbol_peflctx = 0x2ca0a3e0
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLColumns
symbol_peflctx = 0x2ca0bb80
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLConnect
symbol_peflctx = 0x2ca0f4f0
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLDescribeCol
symbol_peflctx = 0x2ca11150
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLDriverConnect
symbol_peflctx = 0x2ca12890
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLExecDirect
symbol_peflctx = 0x2ca154b0
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLForeignKeys
symbol_peflctx = 0x2ca16b40
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLGetConnectAttr
symbol_peflctx = 0x2ca17fb0
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLGetDescField
symbol_peflctx = 0x2ca199d0
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLGetDescRec
symbol_peflctx = 0x2ca19e90
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLGetDiagField
symbol_peflctx = 0x2ca1b060
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLGetDiagRec
symbol_peflctx = 0x2ca1bc90
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLGetInfo
symbol_peflctx = 0x2ca1cad0
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLGetStmtAttr
symbol_peflctx = 0x2ca1d4d0
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLGetTypeInfo
symbol_peflctx = 0x2ca1df90
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLPrepare
symbol_peflctx = 0x2ca1f9b0
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLPrimaryKeys
symbol_peflctx = 0x2ca1fec0
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLProcedureColumns
symbol_peflctx = 0x2ca20470
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLProcedures
symbol_peflctx = 0x2ca20b00
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLSetConnectAttr
symbol_peflctx = 0x2ca21770
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLSetStmtAttr
symbol_peflctx = 0x2ca24320
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLSetDescField
symbol_peflctx = 0x2ca22b30
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLStatistics
symbol_peflctx = 0x2ca258c0
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Entry hgolofns to 2013/04/02-21: 15:38
LIBNAME=/usr/lib64/libodbc.so, funcname is SQLTables
symbol_peflctx = 0x2ca26550
hoaerr:0
Out of hgolofns to 2013/04/02-21: 15:38
Release of hgolofn, rc = 0 to 2013/04/02-21: 15:38
HOSGIP to 'HS_OPEN_CURSORS' returned '50 '.
HOSGIP to 'HS_FDS_FETCH_ROWS' returned '100 '.
HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536".
HOSGIP to 'HS_NLS_NUMERIC_CHARACTER' returned '. "
HOSGIP to 'HS_KEEP_REMOTE_COLUMN_SIZE' returned 'OFF '.
HOSGIP for "HS_FDS_DELAYED_OPEN" returns 'TRUE '.
HOSGIP to 'HS_FDS_WORKAROUNDS' returned '0 '.
HOSGIP to 'HS_FDS_MBCS_TO_GRAPHIC' returned 'FALSE '.
HOSGIP to 'HS_FDS_GRAPHIC_TO_MBCS' returned 'FALSE '.
Invalid value of 64 for HS_FDS_SQLLEN_INTERPRETATION
treat_SQLLEN_as_compiled = 1
Release of hgoinit, rc = 0 to 2013/04/02-21: 15:38
Entry hgolgon to 2013/04/02-21: 15:38
Reco:0, name: *, tflag:0
Entry hgosuec to 2013/04/02-21: 15:38
Release of hgosuec, rc = 0 to 2013/04/02-21: 15:38
HOSGIP to 'HS_FDS_RECOVERY_ACCOUNT' returned 'RECOVER '.
HOSGIP for "HS_FDS_TRANSACTION_LOG" returns "HS_TRANSACTION_LOG".
HOSGIP to 'HS_FDS_TIMESTAMP_MAPPING' returned 'DATE '.
HOSGIP to 'HS_FDS_DATE_MAPPING' returned 'DATE '.
HOSGIP for "HS_FDS_MAP_NCHAR" returns 'TRUE '.
HOSGIP to 'HS_FDS_RESULTSET_SUPPORT' returned 'FALSE '.
HOSGIP to 'HS_FDS_RSET_RETURN_ROWCOUNT' returned 'FALSE '.
HOSGIP to 'HS_FDS_PROC_IS_FUNC' returned 'FALSE '.
HOSGIP to 'HS_FDS_REPORT_REAL_AS_DOUBLE' returned 'FALSE '.
using the * as a default for 'HS_FDS_DEFAULT_OWNER '.
HOSGIP to 'HS_SQL_HANDLE_STMT_REUSE' returned 'FALSE '.
Entry hgocont to 2013/04/02-21: 15:38
HS_FDS_CONNECT_INFO = ' *-* '.
RC =-1 of HOSGIP for 'HS_FDS_CONNECT_STRING '.
Entry hgogenconstr to 2013/04/02-21: 15:38
DSN: *-*, name: *.
OPTN:
Entry hgocip to 2013/04/02-21: 15:38
DSN: *-*.
Release of hgocip, rc = 0 to 2013/04/02-21: 15:38
# > connection settings (len = 39) < #.
## DSN=****-****;
#! UID = *;
#! PWD = *.
Release of hgogenconstr, rc = 0 to 2013/04/02-21: 15:38
Entry hgolosf to 2013/04/02-21: 15:38
ODBC function-available-table 0xFFFE 0x00FF 0xFF00 0x03FF 0xFB7F 0x0000
0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
0x0000 0 x 0000 0xFE00 0x3F5F
Release of hgolosf, rc = 0 to 2013/04/02-21: 15:38
DriverName:libtdsodbc.so, DriverVer:0.91
DBMS name: Microsoft SQL Server DBMS Version: 95.10.0255
Release of hgocont, rc = 0 to 2013/04/02-21: 15:38
SQLGetInfo Returns Y for SQL_CATALOG_NAME
SQLGetInfo Returns 128 for SQL_MAX_CATALOG_NAME_LEN
Release of hgolgon, rc = 0 to 2013/04/02-21: 15:38
Entry hgoulcp to 2013/04/02-21: 15:38
Entry hgowlst to 2013/04/02-21: 15:38
Release of hgowlst, rc = 0 to 2013/04/02-21: 15:38
SQLGetInfo returns 0x1f for SQL_OWNER_USAGE
Able TXN: isolation 2, Option: 0xf
SQLGetInfo Returns 128 for SQL_MAX_SCHEMA_NAME_LEN
SQLGetInfo Returns 128 for SQL_MAX_TABLE_NAME_LEN
SQLGetInfo returns 134 to SQL_MAX_PROCEDURE_NAME_LEN
HOSGIP returned the value "TRUE" to HS_FDS_QUOTE_IDENTIFIER
SQLGetInfo returns "(0 x 22) for SQL_IDENTIFIER_QUOTE_CHAR"
instance 2 capabilities will be uploaded
context: 0x00000000, capno:1989, add info: 0
context: 0x0001ffff, capno:1992, add info: 0
Release of hgoulcp, rc = 0 to 2013/04/02-21: 15:38
Entry hgouldt to 2013/04/02-21: 15:38
NO translation of DD for instance have been downloaded
Release of hgouldt, rc = 0 to 2013/04/02-21: 15:38
Entry hgobegn to 2013/04/02-21: 15:38
tflag:0, original: 1
Hoi:0x4093b4c8, ttid (len 38) is...
00: 54415058 2E435245 49474854 4F4E2E45 [TAPX]
10: 44552E33 61383332 3362322E 312E3233 [3a8323b2.1.23]
20: 2E323037 3631 [. 20761]
tbid (len 35) is...
00: 54415058 2E435245 49474854 4F4E2E45 [TAPX]
10: 44555 B 31 2E32332E 32303736 315D5B31 [[1.23.20761] [1]]
[20: 2E345D [. 4]]
Release of hgobegn, rc = 0 to 2013/04/02-21: 15:38
Entry hgodtab to 2013/04/02-21: 15:38
number: 1
Table: address
Allocate hoada [0] @ 0x14eedc70
Hoada free [0] @ 0x14eedc70
SQL text of hgodtab, id = 0, len = 23...
00: 73656C 65 6374202A 6 202241 2066726F [select * 'a]
10: 64647265 737322 [prepare]"
Entry hgodscr_process_sellist_description to 2013/04/02-21: 15:38
Thanks a lot for your help.
PAL
Published by: 997807 on April 3, 2013 07:26Hello
Thanks for the information. 2.2 UnixODBC driver manager is quite old and there is now one more late 2.3.1 version available here.http://www.unixODBC.org/
by clicking on the tab "Download".
Can you download and install this version then use in the configuration instead of the 2.2 version?Kind regards
Mike -
I created the Web service VI ("Mt-insolacije.vi"), which has two terminals of the input string (FROM / TO) for the dates of arrival and exit of two data terminals (table 1 d) from database (MS SQL server). This VI communicates with the database with functions of the database with a DSN and SQL query appropriate palette. There are two tables with two data (time and Insolation) columns in the database.
This VI works when you run in Labview 2010, but when I used it as VI in UI Builder it returns no data.
Could you please help me find a solution. Is it possible to communicate with the SQL server database in this way or there is another way?
There are two files attachmet: Image of .vix file in Interface builder and .vi file ("Mt-insolacije.vi")
Please help me ASAP!
Thank you
Ivan
I found the solution problem is in the DSN. I've been using the user instead of DSN system DSN.
It's important to create the system DSN if you want your VI of web service to communicate with the database.
PS Please put feature bundle format timestamp and XY graph in the web user interface designer. It's complicated to trace data with datetime on X axis without them.
-
create the SQL server programmatially data source
Hello
I would like to create a SQL server by programming in LabVIEW data source. The SQL server version that I used is from 2005. Can someone give some ideas? An example of code will be more favorable.
Thank you
Jane
You can build the connection string you even. The open function in the Toolbox of data base accepts a string as well (it's polymorphic) who can be the connection string. This is the site I use to understand. Is the most common things. You may need to search Google more specific elements.
http://www.ConnectionStrings.com/
If you want to use the other option, someone has achieved a UDL editor in LabVIEW. You can use this code to create your own UDL which can use the Open DB function:
https://decibel.NI.com/content/docs/doc-18613
I have used the above code, so can't comment on that.
-
Hello
I was wondering if you could help me.
I'm trying to find out how to export a .sql file, I created from Oracle Application Express of SQL Server Management 2012? I'm not very technical, but it seems that the Oracle code does not work with SQL Management Studio when I drag the file inside.
I need the database Oracle express and its data to enter in SQL Management Studio, so any help would be much appreciated!
Thank you.
Hello
Your question is beyond the scope of this community.
Please repost your question in the SQL Server TechNet Forums.
https://social.technet.Microsoft.com/forums/SQLServer/en-us/home?category=SQLServer
See you soon.
-
DG Oracle 11 GR 2 - SQL Server connection problem
Hi all
I read the forum discussions and documentation. As far as I can see I have just, however running in typical error:
The documentation seems also like plug & play so I must have missed something, if my config files are correct.ORA-28500: connection from ORACLE to a non-Oracle system returned this message: [Oracle][ODBC SQL Server Driver][DBNETLIB]Invalid connection. {08001,NativeErr = 14}[Oracle][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (ParseConnectParams()). {01000,NativeErr = 14}[Oracle][ODBC SQL Server Driver]Invalid connection string attribute {01S00} ORA-02063: preceding 2 lines from MSSQL2008 28500. 00000 - "connection from ORACLE to a non-Oracle system returned this message:" *Cause: The cause is explained in the forwarded message. *Action: See the non-Oracle system's documentation of the forwarded message. Error at Line: 3 Column: 46
My environment is made up of:
====================
Localhost: Oracle 11.2.0.3 on Windows 7 x 64
Remote host: SQL Server 2005, 2008, SQLExpress-> each running on their own static ports
Oracle software Gatways 11 GR 2 is installed on the localhost on port 1522.
I am trying to connect to the adventure works database on SQL server, but keep the above error. Here's my config files.
ORACLE_HOME=c:\oracle\product\11.2.0\dbhome_1
ORACLE_GATEWAY=c:\oracle\product\11.2.0\gtwhome_1
ORACLE_GATEWAY-> init4dgmsql.ora
ORACLE_GATEWAY-> listener.ora# This is a customized agent init file that contains the HS parameters # that are needed for the Database Gateway for Microsoft SQL Server # # HS init parameters # HS_FDS_CONNECT_INFO=[SVR-DEV-CLU-01:1434]/SQL2008/AdventtureWorks2008R2 HS_FDS_TRACE_LEVEL=ON HS_FDS_RECOVERY_ACCOUNT=RECOVER HS_FDS_RECOVERY_PWD=RECOVER
ORACLE_HOME--> tnsnames.ora# listener.ora Network Configuration File: C:\oracle\product\11.2.0\gtwhome_1\network\admin\listener.ora # Generated by Oracle configuration tools. LISTENER_GTW = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522)) (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522)) ) ) SID_LIST_LISTENER_GTW= (SID_LIST= (SID_DESC= (SID_NAME=dg4msql) (ORACLE_HOME=C:\oracle\product\11.2.0\gtwhome_1) (PROGRAM=dg4msql) ) ) ADR_BASE_LISTENER_GTW = C:\oracle\product\11.2.0\gtwhome_1
Local database-> db linkdg4msql = (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522)) (CONNECT_DATA= (SID=dg4msql) ) (HS=OK) )
I have validated here sis there no dynamic ports and each database is running on its own static port, in this case, 1434. I did a tnsping the LISTENER_GTW responds properly. I did a ping on the server to validate the name of the server it's ok too.CREATE PUBLIC DATABASE LINK MSSQL2008 CONNECT TO "ORACLE_GATEWAY" IDENTIFIED BY "Dbsoft1234" USING 'dg4msql'; select AddressLine1, City from Person.Address@MSSQL2008;
SQL Server 2008:
Failure also on:Server Name: SQL2008\SQL2008 Instance Name: SQL2008 Port: 1434 Database: AdvebtureWorks2008R2 (case sensitive)
SQL Server 2005
Thanks in advance for any help.Server Name: SVR-CLU-DEV-01\SQL2005 Instance Name: SQL2005 Dataabse: master
Jan S.Hello
The configuration files look correct, except for the value of init4dgmsql.ora to HS_FDS_CONNECT_INFO.The recommended settings are in format-
HS_FDS_CONNECT_INFO =
: .
HS_FDS_CONNECT_INFO =/ /. You defined as -
HS_FDS_CONNECT_INFO = [SVR-DEV-CLU - 01:1434] / SQL2008/AdventtureWorks2008R2
What happens if you set -
HS_FDS_CONNECT_INFO = [SVR-DEV-CLU-01] / SQL2008/AdventtureWorks2008R2
or
HS_FDS_CONNECT_INFO = [SVR-DEV-CLU - 01:1434] //AdventtureWorks2008R2
Another point, you posted the SQL * Server as -information
Server name: SQL2008\SQL2008
Instance name: SQL2008
Port: 1434
Database: AdvebtureWorks2008R2 (case sensitive)so, is the name of the database AdventtureWorks2008R2 or AdvebtureWorks2008R2?
Please make sure you use the correct name.Kind regards
Mike -
Oracle 9i with microsoft sql server.
How to connect oracle 9i with microsoft sql server.simply the following steps...
Oracle9i, like the previous versions, supports heterogeneous services in order to allow data in the non-Oracle database to be queried using SQL. This support was in the form of transparent gateways, which are connectivity, vendor specific or generic using ODBC or OLEDB to connect. Features supported by a generic connectivity are generally more limited than as possible when using the vendor specific gateways, but it is fast and simple to configure. The following steps can be used to connect to Oracle to any compatible ODBC database (MS Access, SQL Server etc.) on the local server:
Make sure that a valid user name and password are present for the non-Oracle (MyUser/mypassword) database.
Create a data source ODBC for database non-Oracle (Network1).
Create a file called: "ORACLE_HOME\hs\admin\initACCESS1.ora", which contains:HS_FDS_CONNECT_INFO = Network1 #ODBC DSN
HS_FDS_TRACE_LEVEL = OFF
Add the following entry in the tnsnames.ora file:NETWORK1. WORLD =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = tcp)(HOST=localhost) (PORT = 1521))
(CONNECT_DATA = (SID = ACCESS1))
(HS = OK)
)
Add the following entry in the listener.ora file:(SID_DESC =
(SID_NAME = NETWORK1)
(ORACLE_HOME = D:\Oracle\Ora\9011)
(PROGRAM = hsodbc)
)
Reload the listener: lsnrctl reload
Create a database to help link:CREATE DATABASE LINK access1.world CONNECT TO 'MyUser' IDENTIFIED BY 'MyPassword' USING "Network1. WORLD ';
Query the table to help:SELECT *.
OF [email protected];
With MS Access, the first query is slow because of the request for access is loading. As expected, the following queries are not displayed a similar shift. -
How to completely remove the SQL Server 2008 R2 from my system?
I got the SQL Server loaded on my computer before I realized it was the express edition that I needed. When I tried to load the version I needed the computer said that I had to create a new instance for the second version to run simultaneously. (had already uninstalled the original SQL Server and did not not the problem.) I went through the steps again and somehow there is the menu server must remove files, but they can access it. The only solution I see at the moment is to reload the server and uninstall and I hope that everything that caused its not completely withdraw from my system is corrected. Please tell me there is another solution which has guaranteed results.
Hi Avendia,
Your question would be better asked on the SQL Server forum
SQL Server Forum
http://social.msdn.Microsoft.com/forums/en-us/category/SQLServer -
Windows Update - a security update to the SQL Server 2005 Service Pack 3 (KB970892)
How to install Windows Update security for the SQL Server 2005 Service Pack 3 (KB970892) when he continually fails to install.
Provide as much information as possible and try this forum.
The SQL Server installation & set program at level
http://social.msdn.Microsoft.com/forums/en-us/sqlsetupandupgrade/threads/ TaurArian [MVP] 2005-2010 - Update Services -
Have tried several times the update. Same results. Running Windows XP
You can either search or post in the following newsgroup.
The SQL Server installation & set program at level
http://social.msdn.Microsoft.com/forums/en-us/sqlsetupandupgrade/threads/ TaurArian [MVP] 2005-2010 - Update Services -
This update is required? And why it has not been downloaded when I bought the PC? It is now only a few months old.
Try this other forum:
The SQL Server installation & set program at level
http://social.msdn.Microsoft.com/forums/en-us/sqlsetupandupgrade/threads/ TaurArian [MVP] 2005-2010 - Update Services -
Update of security for the SQL Server 2005 Service Pack 3 (KB970892) does not load.
Someone at - he found a way to load it correctly?
Hello
Welcome to the Microsoft Vista answers Forum!
Try the steps below and check if the problem is resolved,
Download the stand-alone package of "A security update to the SQL Server 2005 Service Pack 3 (KB970892)" from the link:
Now you must install the update in safe mode.
Restart the computer using safe and then by running the Setup program
The next step to install the program in safe mode is to restart your computer in safe mode, and then run Setup from the hard drive. To do this, follow these steps:
1.
To start Windows in safe mode, follow these steps:
one.
Click Start and then click on stop.
b.
Click on restart the computer and then click OK.
c.
To enter the safe mode of Windows Vista, the computer starts to press on and hold your "F8 key" which should show "Windows Advanced Options Menu" as shown below. Use your key to move to "Safe Mode" and press your enter key.
d.
When Windows starts in safe mode, click OK.
Now try to install the update and check for the issue.
If the above provided steps fail, then you need to visit the link provided to connect with the following technet forum:
http://social.technet.Microsoft.com/forums/en-us/categories/
Hope this information is useful.
Thank you, and in what concerns:
Suresh Kumar-Microsoft Support.
Visit our http://social.answers.microsoft.com/Forums/en-US/answersfeedback/threads/ Microsoft answers feedback Forum and let us know what you think.
-
The SQL server system configuration checker cannot be executed due to WMI configuration on the computer
Toshiba-User Error: 2147749896 (0 x 80041008)I am trying to load the software for insurance. I got the above message.Hello
The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums.
The SQL Server installation & set program to update Forum -
Update of security for the SQL Server 2005 Service Pack 3 (KB970892) constantly moved, what can I do about it?
The update tried to automatically install dozens of times, but it keeps failing, is there something I can fix which will allow this facility. I have reasonable computer skills but I'm not good at that, I need step by step help and a full explanation of acronyms.Hi Laurence,.
The issue of Windows is more complex than what is generally answered in the Microsoft Community Forums. Appropriate in the TechNet Forums. Please post your question in the TechNet Forums.
You can check the link to post your question:
http://social.technet.Microsoft.com/forums/en-us/category/SQLServer
I hope that helps!
-
Error code 64 c for update of security for the SQL Server 2005 Service Pack 3 (KB2494113)
Have tried to install KB2494113 - update of safety and he constantly fails to install. Help please as I know very little about the "intricacies" of my laptop
Hi Phillipmuir,
Step 1:
You can read the following article and try to reset the Windows Update components and check.
How to reset the Windows Update components?
http://support.Microsoft.com/kb/971058
Step 2:
You can also check the following link and try to download and install the standalone update package:
Update of security for the SQL Server 2005 Service Pack 3 (KB2494113)
Hope this information is useful.
Maybe you are looking for
-
Make wider bars...
Is it possible that I can do the wider bars?
-
Can I delete my recent insert in browser preferences?
I just entered an incorrect insertion in my browser preferences.I think he could have just barely out of a few empty spaces and now I want to just delete it and try again.But there were warnings beforehand when I opened "Prefs" to be VERY careful.I w
-
The digital section Microsoft on my curve keyboard has stopped working?
Num Lock is turned on but is not working. The arrows will work?
-
Capture the signal micro PC line
I am aware of LabVIEW Sound screws and I used them often. My question is that if I have a line in signal plugged into the microphone port, how can I capture. There is no mic involved, just a line of sinusoidal signal. Thanks for the help,
-
Windows 7 32 bit drivers for HP Pavilion N004tx
Have HP 15-N004TX with windows 7, 32 bit operating system installed. Unable to control the brightness, please help