How to export an image column from SQL server to an excel

Hi team,
Would like to know how can i get an Image column storeed in SQL Server database to get copied in Excel (Hard Drive).
Requirement : Need to get Username, User email address and User photo in to an excel sheet from SQL server database.
Fix: I can get Username and Useremail adress however could not find a way to export /Copy user Image.
Please suggest
Thanks,
venkatesh

This is an Oracle forum. Your question relates to SQL Server and Excel, neither of which are Oracle related.

Similar Messages

  • How can I export image column from SQL Server 2000

    Hi everybody,could someone tell me how can I export an entire column( pictures type) to a folder on disk?I've tried the textcopy.exe under the SQL installation's binn folder,it can only export one picture a time,I'm trying to find an automated way to export
    the whole colum's images to a folder,I'm using SQL Server 2000.

    Vishal,thanks for the replay,I've tried the BCP method but it seems does not work on my Sql Server 2000,also the SSIS package method is demonstrated with Sql Server 2008 R2 and my machine does not have the visual application to try it.In the BCP method,I
    got prompt  indicating me that I wrote something wrong in the grammer,and I'm pretty sure that maybe I made something wrong in the below part,the grammer makes me confused
    INSERT
    INTO @sqlStatements
    SELECT 'BCP "SELECT Photograph_Data FROM [ALBSCH_Trial].[dbo].[Photograph] WHERE Photograph_ID = '''
    + CAST(Photograph_ID AS VARCHAR(500)) + '''" queryout ' + @OutputFilePath
    + CAST(Photograph_ID AS VARCHAR(500)) + '.jpg -S localhost\SQLEXPRESS2008 -T -f C:\SQLTest\Images.fmt'
    FROM dbo.Photograph

  • How to deal with image type from SQL*Server2005

    when using transparent gateway between oracle 10 g and SQL*Server 2005 querying image type from SQL*Server 2005 error returned as follow:
    ORA-28500: When ORACLE connect to a non-Oracle system return this information:
    [Transparent gateway for MSSQL] (SQL State: 00000; SQL Code: 2090171257)
    ORA-02063: Followed by 2 lines (From OKFOC)
    My SQL is: select "attachment" from table@dblink where "empid"=empid
    I am using image type to store attachments.
    Regards!
    Edited by: BK_Ferdinand on 2013-1-10 下午7:09

    (0) Original SQL:
    (0) select NON_UNIQUE , INDEX_NAME , TYPE , SEQ_IN_INDEX , COLLATION ,
    CARDINALITY , COLUMN_NAME from NAV_PROC : SP_STATISTICS ( 'OKFOC' , '%'
    , 'T_FLY_FLYER_REWARD' , 1 , 0 , 0 ) order by 3 , 1 , 2 , 4
    (0)
    (0)
    (0) Accessing saved query spec SP_STATISTICS()
    (0) from NAV_PROC DB
    (0)
    Execution Strategy End >>>>>>>>>>>>>>>>>>>>>>>>>>>>(0) <PROC> : -->>>> OPEN
    (0) <PROC> < OK>: OPEN SP_STATISTICS(0)
    (0) <PROC> : -->>>> SET_BUFFER
    (0) <PROC> < OK>: SET_BUFFER SP_STATISTICS(0)
    (0) <PROC> : -->>>> SET_PARAMS
    (0) <PROC> < OK>: SET_PARAMS SP_STATISTICS(0)
    (0) <PROC> : -->>>> FETCH
    (0) <PROC> < OK>: FETCH SP_STATISTICS(0)
    (0) <PROC> : -->>>> FETCH
    (0) <PROC> < EOS>: FETCH SP_STATISTICS(0)
    (0) <PROC> : -->>>> CLOSE
    (0) <PROC> < OK>: CLOSE SP_STATISTICS(0)
    (0) HOAUTIL.C (1259): ; ------ hoadtab (hoat) -------:
    (0) HOAUTIL.C (1262): ; hoatnam: T_FLY_FLYER_REWARD, hoatnml: 18,
    hoatnrw: 3,
    (0) hoatarl: 1881
    (0) HOAUTIL.C (1273): ; ------ hoadtab (hoai) -------:
    (0) HOAUTIL.C (1274): ; n_index_stat: 0
    (0) HOAUTIL.C (1224): ; -------- hoadtab for table T_FLY_FLYER_REWARD--
    (0) HOAUTIL.C (1225): ; hoadamsz: 12, hoadasiz: 12, hoadambr: 1,
    hoadabrc: 0
    (0) HOAUTIL.C (1228): ; row 0 - hoadambl: 4, hoadadty: 8, hoadaprc: 10,
    hoadacst: 0
    (0) HOAUTIL.C (1232): ; row 0 - hoadascl: 0, hoadanul: 1, hoadanml: 4,
    hoadanam:
    (0) pkid, hoadabfl: 4, hoadamod: 0
    (0) HOAUTIL.C (1228): ; row 1 - hoadambl: 4, hoadadty: 8, hoadaprc: 10,
    hoadacst: 0
    (0) HOAUTIL.C (1232): ; row 1 - hoadascl: 0, hoadanul: 1, hoadanml: 5,
    hoadanam:
    (0) empid, hoadabfl: 4, hoadamod: 0
    (0) HOAUTIL.C (1228): ; row 2 - hoadambl: 7, hoadadty: 167, hoadaprc: 0,
    hoadacst:
    (0) 0
    (0) HOAUTIL.C (1232): ; row 2 - hoadascl: 0, hoadanul: 1, hoadanml: 9,
    hoadanam:
    (0) startdate, hoadabfl: 7, hoadamod: 0
    (0) HOAUTIL.C (1228): ; row 3 - hoadambl: 7, hoadadty: 167, hoadaprc: 0,
    hoadacst:
    (0) 0
    (0) HOAUTIL.C (1232): ; row 3 - hoadascl: 0, hoadanul: 1, hoadanml: 7,
    hoadanam:
    (0) enddate, hoadabfl: 7, hoadamod: 0
    (0) HOAUTIL.C (1228): ; row 4 - hoadambl: 8, hoadadty: 14, hoadaprc: 8,
    hoadacst:
    (0) 1000
    (0) HOAUTIL.C (1232): ; row 4 - hoadascl: 0, hoadanul: 1, hoadanml: 6,
    hoadanam:
    (0) recate, hoadabfl: 8, hoadamod: 0
    (0) HOAUTIL.C (1228): ; row 5 - hoadambl: 100, hoadadty: 14, hoadaprc:
    100,
    (0) hoadacst: 1000
    (0) HOAUTIL.C (1232): ; row 5 - hoadascl: 0, hoadanul: 1, hoadanml: 6,
    hoadanam:
    (0) retype, hoadabfl: 100, hoadamod: 0
    (0) HOAUTIL.C (1228): ; row 6 - hoadambl: 400, hoadadty: 14, hoadaprc:
    400,
    (0) hoadacst: 1000
    (0) HOAUTIL.C (1232): ; row 6 - hoadascl: 0, hoadanul: 1, hoadanml: 7,
    hoadanam:
    (0) rereson, hoadabfl: 400, hoadamod: 0
    (0) HOAUTIL.C (1228): ; row 7 - hoadambl: 1000, hoadadty: 14, hoadaprc:
    1000,
    (0) hoadacst: 1000
    (0) HOAUTIL.C (1232): ; row 7 - hoadascl: 0, hoadanul: 1, hoadanml: 6,
    hoadanam:
    (0) remark, hoadabfl: 1000, hoadamod: 0
    (0) HOAUTIL.C (1228): ; row 8 - hoadambl: 40, hoadadty: 14, hoadaprc:
    40,
    (0) hoadacst: 1000
    (0) HOAUTIL.C (1232): ; row 8 - hoadascl: 0, hoadanul: 1, hoadanml: 12,
    hoadanam:
    (0) lastmodifier, hoadabfl: 40, hoadamod: 0
    (0) HOAUTIL.C (1228): ; row 9 - hoadambl: 7, hoadadty: 167, hoadaprc: 0,
    hoadacst:
    (0) 0
    (0) HOAUTIL.C (1232): ; row 9 - hoadascl: 0, hoadanul: 1, hoadanml: 14,
    hoadanam:
    (0) lastmodifidate, hoadabfl: 7, hoadamod: 0
    (0) HOAUTIL.C (1228): ; row 10 - hoadambl: 2147483647, hoadadty: 166,
    hoadaprc:
    (0) 2147483647, hoadacst: 0
    (0) HOAUTIL.C (1232): ; row 10 - hoadascl: 0, hoadanul: 1, hoadanml: 10,
    hoadanam:
    (0) attachment, hoadabfl: 2147483647, hoadamod: 0
    (0) HOAUTIL.C (1228): ; row 11 - hoadambl: 200, hoadadty: 14, hoadaprc:
    200,
    (0) hoadacst: 1000
    (0) HOAUTIL.C (1232): ; row 11 - hoadascl: 0, hoadanul: 1, hoadanml: 14,
    hoadanam:
    (0) attachmentname, hoadabfl: 200, hoadamod: 0
    (0) hoadtab (26): ; hoadtab Exited with retcode = 0.
    (0) hoadafr (23): ; hoadafr Entered. id = 0.
    (0) hoadafr (23): ; hoadafr Exited with retcode = 0.
    (0) hoapars (15): ; hoapars Entered. stmtType = 0, id = 1.
    (0) nvOUT (F:\Work\Connect_4_6_3\src\qp\QP_SQTXT.C 55): SELECT
    A1."attachment"
    (0) FROM "T_FLY_FLYER_REWARD" A1 WHERE A1."empid"=10004036
    (0) nvRETURN (F:\Work\Connect_4_6_3\src\qp\qpsynon.c 1140): -1
    (0) SELECT "A1"."attachmentname" AS c001, "A1"."lastmodifidate" AS
    c002, "A1"."lastmodifier" AS c003, "A1"."remark" AS c004, "A1"."rereson"
    AS c005, "A1"."retype" AS c006, "A1"."recate" AS c007, "A1"."enddate" AS
    c008, "A1"."startdate" AS c009, "A1"."empid" AS c010, "A1"."pkid" AS
    c011 FROM "T_FLY_FLYER_REWARD" "A1" WHERE ("A1"."empid" = 10004036)
    (0)
    (0) r: 74 0 SQLAllocStmt:- hdbc=14247C0,pst=12E7C0
    (0) r: 113 0 SQLPrepare:- hst=14254F0, css=14785772
    (0) Ssss = SELECT "A1"."attachmentname" AS c001,
    "A1"."lastmodifid
    ate" AS c002, "A1"."lastmodifier" AS c003, "A1"."remark"
    AS c0
    04, "A1"."rereson" AS c005, "A1"."retype" AS c006,
    "A1"."recat
    e" AS c007, "A1"."enddate" AS c008, "A1"."startdate" AS
    c009,
    "A1"."empid" AS c010, "A1"."pkid" AS c011 FROM
    "T_FLY_FLYER_RE
    WARD" "A1" WHERE ("A1"."empid" = 10004036)
    (0) r: 863 0 SQLNumResultCols:- hst=14254F0,pcol=11
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=1,scn=c001,cnm=64,pcn=12E6DE,p
    st=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=1,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=1,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=2,scn=c002,cnm=64,pcn=12E6DE,p
    st=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=2,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=2,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=3,scn=c003,cnm=64,pcn=12E6DE,p
    st=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=3,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=3,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=4,scn=c004,cnm=64,pcn=12E6DE,p
    st=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=4,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=4,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=5,scn=c005,cnm=64,pcn=12E6DE,p
    st=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=5,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=5,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=6,scn=c006,cnm=64,pcn=12E6DE,p
    st=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=6,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=6,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=7,scn=c007,cnm=64,pcn=12E6DE,p
    st=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=7,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=7,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=8,scn=c008,cnm=64,pcn=12E6DE,p
    st=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=8,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=8,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=9,scn=c009,cnm=64,pcn=12E6DE,p
    st=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=9,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=9,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=10,scn=c010,cnm=64,pcn=12E6DE,
    pst=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=10,fdt=10,rgbd=0,cbdm=0,pcbd
    =0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=10,fdt=11,rgbd=0,cbdm=0,pcbd
    =0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=11,scn=c011,cnm=64,pcn=12E6DE,
    pst=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=11,fdt=10,rgbd=0,cbdm=0,pcbd
    =0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=11,fdt=11,rgbd=0,cbdm=0,pcbd
    =0,pfd=12E6E4
    (0) r: 147 0 SQLFreeStmt:- hst=14254F0, fop=1
    (0) <<<<<<<<<<<<<<<<<<< Execution Strategy Begin
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<
    (0) Original SQL:
    (0) SELECT A1 . "attachment" FROM "T_FLY_FLYER_REWARD" A1 WHERE A1 .
    "empid" = 10004036
    (0)
    (0)
    (0) Accessing Database 'OKFOC' with SQL:
    (0) SELECT "A1"."attachmentname" AS c001, "A1"."lastmodifidate" AS
    c002, "A1"."lastmodifier" AS c003, "A1"."remark" AS c004, "A1"."rereson"
    AS c005, "A1"."retype" AS c006, "A1"."recate" AS c007, "A1"."enddate" AS
    c008, "A1"."startdate" AS c009, "A1"."empid" AS c010, "A1"."pkid" AS
    c011 FROM "T_FLY_FLYER_REWARD" "A1" WHERE ("A1"."empid" = 10004036)
    (0)
    (0)
    Execution Strategy End >>>>>>>>>>>>>>>>>>>>>>>>>>>>(0) hoapars (15): ; hoapars Exited with retcode = 0.
    (0) hoaopen (19): ; hoaopen Entered. id = 1.
    (0) hoaopen (19): ; hoaopen Exited with retcode = 0.
    (0) hoadscr (16): ; hoadscr Entered. id = 1.
    (0) hoastmt.c (304): ; Array fetch size is: 1.
    (0) HOAUTIL.C (1224): ; ------ hoadscr() -------:
    (0) HOAUTIL.C (1225): ; hoadamsz: 1, hoadasiz: 1, hoadambr: 1, hoadabrc:
    1
    (0) HOAUTIL.C (1228): ; row 0 - hoadambl: 2147483647, hoadadty: 166,
    hoadaprc:
    (0) 2147483647, hoadacst: 0
    (0) HOAUTIL.C (1232): ; row 0 - hoadascl: 0, hoadanul: 1, hoadanml: 13,
    hoadanam:
    (0) A1.attachment, hoadabfl: 2147483647, hoadamod: 0
    (0) hoadscr (16): ; hoadscr Exited with retcode = 0.
    (0) hoaftch (21): ; hoaftch Entered. id = 1.
    (0) apiutil.c (0): ; hoaftch()::
    (0) apiutil.c (0): ; Column 0 - pszName: A1.attachment, size: 1827, id:
    0, width:
    (0) 1827, scale: 0, flags: 68.
    (0) SELECT "A1"."attachmentname" AS c001, "A1"."lastmodifidate" AS
    c002, "A1"."lastmodifier" AS c003, "A1"."remark" AS c004, "A1"."rereson"
    AS c005, "A1"."retype" AS c006, "A1"."recate" AS c007, "A1"."enddate" AS
    c008, "A1"."startdate" AS c009, "A1"."empid" AS c010, "A1"."pkid" AS
    c011 FROM "T_FLY_FLYER_REWARD" "A1" WHERE ("A1"."empid" = 10004036)
    (0)
    (0) r: 74 0 SQLAllocStmt:- hdbc=14247C0,pst=12EBBC
    (0) r: 113 0 SQLPrepare:- hst=14254F0, css=14635668
    (0) Ssss = SELECT "A1"."attachmentname" AS c001,
    "A1"."lastmodifid
    ate" AS c002, "A1"."lastmodifier" AS c003, "A1"."remark"
    AS c0
    04, "A1"."rereson" AS c005, "A1"."retype" AS c006,
    "A1"."recat
    e" AS c007, "A1"."enddate" AS c008, "A1"."startdate" AS
    c009,
    "A1"."empid" AS c010, "A1"."pkid" AS c011 FROM
    "T_FLY_FLYER_RE
    WARD" "A1" WHERE ("A1"."empid" = 10004036)
    (0) r: 863 0 SQLNumResultCols:- hst=14254F0,pcol=11
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=1,scn=c001,cnm=64,pcn=12EADA,p
    st=12EAF0,pcd=12EAE8,psc=12EAEC,pnul=12EAE4
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=1,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12EADC
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=1,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12EAE0
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=2,scn=c002,cnm=64,pcn=12EADA,p
    st=12EAF0,pcd=12EAE8,psc=12EAEC,pnul=12EAE4
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=2,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12EADC
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=2,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12EAE0
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=3,scn=c003,cnm=64,pcn=12EADA,p
    st=12EAF0,pcd=12EAE8,psc=12EAEC,pnul=12EAE4
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=3,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12EADC
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=3,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12EAE0
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=4,scn=c004,cnm=64,pcn=12EADA,p
    st=12EAF0,pcd=12EAE8,psc=12EAEC,pnul=12EAE4
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=4,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12EADC
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=4,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12EAE0
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=5,scn=c005,cnm=64,pcn=12EADA,p
    st=12EAF0,pcd=12EAE8,psc=12EAEC,pnul=12EAE4
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=5,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12EADC
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=5,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12EAE0
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=6,scn=c006,cnm=64,pcn=12EADA,p
    st=12EAF0,pcd=12EAE8,psc=12EAEC,pnul=12EAE4
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=6,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12EADC
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=6,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12EAE0
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=7,scn=c007,cnm=64,pcn=12EADA,p
    st=12EAF0,pcd=12EAE8,psc=12EAEC,pnul=12EAE4
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=7,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12EADC
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=7,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12EAE0
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=8,scn=c008,cnm=64,pcn=12EADA,p
    st=12EAF0,pcd=12EAE8,psc=12EAEC,pnul=12EAE4
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=8,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12EADC
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=8,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12EAE0
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=9,scn=c009,cnm=64,pcn=12EADA,p
    st=12EAF0,pcd=12EAE8,psc=12EAEC,pnul=12EAE4
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=9,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12EADC
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=9,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12EAE0
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=10,scn=c010,cnm=64,pcn=12EADA,
    pst=12EAF0,pcd=12EAE8,psc=12EAEC,pnul=12EAE4
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=10,fdt=10,rgbd=0,cbdm=0,pcbd
    =0,pfd=12EADC
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=10,fdt=11,rgbd=0,cbdm=0,pcbd
    =0,pfd=12EAE0
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=11,scn=c011,cnm=64,pcn=12EADA,
    pst=12EAF0,pcd=12EAE8,psc=12EAEC,pnul=12EAE4
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=11,fdt=10,rgbd=0,cbdm=0,pcbd
    =0,pfd=12EADC
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=11,fdt=11,rgbd=0,cbdm=0,pcbd
    =0,pfd=12EAE0
    (0) r: 147 0 SQLFreeStmt:- hst=14254F0, fop=1
    (0) e: 744 0 SQLAllocStmt:- hdbc=14247C0,pst=DF7A98
    (0) e: 760 0 SQLPrepare:- hst=14254F0, css=14646584
    (0) Ssss = SELECT "A1"."attachmentname" AS c001,
    "A1"."lastmodifid
    ate" AS c002, "A1"."lastmodifier" AS c003, "A1"."remark"
    AS c0
    04, "A1"."rereson" AS c005, "A1"."retype" AS c006,
    "A1"."recat
    e" AS c007, "A1"."enddate" AS c008, "A1"."startdate" AS
    c009,
    "A1"."empid" AS c010, "A1"."pkid" AS c011 FROM
    "T_FLY_FLYER_RE
    WARD" "A1" WHERE ("A1"."empid" = 10004036)
    (0) e: 765 0 SQLNumResultCols:- hst=14254F0,pcol=11
    (0) e: 782 0 SQLDescribeCol:-
    hst=14254F0,icol=1,scn=c001,cnm=128,pcn=DFE17A,
    pst=DFE17C,pcd=DFE180,psc=DFE184,pnul=DFE186
    (0) e: 782 0 SQLDescribeCol:-
    hst=14254F0,icol=2,scn=c002,cnm=128,pcn=DFE22A,
    pst=DFE22C,pcd=DFE230,psc=DFE234,pnul=DFE236
    (0) e: 782 0 SQLDescribeCol:-
    hst=14254F0,icol=3,scn=c003,cnm=128,pcn=DFE2DA,
    pst=DFE2DC,pcd=DFE2E0,psc=DFE2E4,pnul=DFE2E6
    (0) e: 782 0 SQLDescribeCol:-
    hst=14254F0,icol=4,scn=c004,cnm=128,pcn=DFE38A,
    pst=DFE38C,pcd=DFE390,psc=DFE394,pnul=DFE396
    (0) e: 782 0 SQLDescribeCol:-
    hst=14254F0,icol=5,scn=c005,cnm=128,pcn=DFE43A,
    pst=DFE43C,pcd=DFE440,psc=DFE444,pnul=DFE446
    (0) e: 782 0 SQLDescribeCol:-
    hst=14254F0,icol=6,scn=c006,cnm=128,pcn=DFE52A,
    pst=DFE52C,pcd=DFE530,psc=DFE534,pnul=DFE536
    (0) e: 782 0 SQLDescribeCol:-
    hst=14254F0,icol=7,scn=c007,cnm=128,pcn=DFE5DA,
    pst=DFE5DC,pcd=DFE5E0,psc=DFE5E4,pnul=DFE5E6
    (0) e: 782 0 SQLDescribeCol:-
    hst=14254F0,icol=8,scn=c008,cnm=128,pcn=DFE68A,
    pst=DFE68C,pcd=DFE690,psc=DFE694,pnul=DFE696
    (0) e: 782 0 SQLDescribeCol:-
    hst=14254F0,icol=9,scn=c009,cnm=128,pcn=DFE73A,
    pst=DFE73C,pcd=DFE740,psc=DFE744,pnul=DFE746
    (0) e: 782 0 SQLDescribeCol:-
    hst=14254F0,icol=10,scn=c010,cnm=128,pcn=DFE7EA
    ,pst=DFE7EC,pcd=DFE7F0,psc=DFE7F4,pnul=DFE7F6
    (0) e: 782 0 SQLDescribeCol:-
    hst=14254F0,icol=11,scn=c011,cnm=128,pcn=DFE8EA
    ,pst=DFE8EC,pcd=DFE8F0,psc=DFE8F4,pnul=DFE8F6
    (0) e: 502 0 SQLBindCol:- hst=14254F0,icl=1,fct=-
    8,rgv=DFF114,cbvm=202,pcv=14
    674388
    (0) e: 502 0 SQLBindCol:-
    hst=14254F0,icl=2,fct=99,rgv=E04024,cbvm=16,pcv=146
    98084
    (0) e: 502 0 SQLBindCol:- hst=14254F0,icl=3,fct=-
    8,rgv=E0504C,cbvm=42,pcv=146
    98484
    (0) e: 502 0 SQLBindCol:- hst=14254F0,icl=4,fct=-
    8,rgv=E2B004,cbvm=1002,pcv=1
    4698884
    (0) e: 502 0 SQLBindCol:- hst=14254F0,icl=5,fct=-
    8,rgv=E060DC,cbvm=402,pcv=14
    699284
    (0) e: 502 0 SQLBindCol:- hst=14254F0,icl=6,fct=-
    8,rgv=E43794,cbvm=102,pcv=14
    699684
    (0) e: 502 0 SQLBindCol:- hst=14254F0,icl=7,fct=-
    8,rgv=E0FE0C,cbvm=10,pcv=147
    46100
    (0) e: 502 0 SQLBindCol:-
    hst=14254F0,icl=8,fct=99,rgv=E10384,cbvm=16,pcv=147
    48100
    (0) e: 502 0 SQLBindCol:-
    hst=14254F0,icl=9,fct=99,rgv=E10E34,cbvm=16,pcv=147
    50836
    (0) e: 502 0 SQLBindCol:-
    hst=14254F0,icl=10,fct=99,rgv=E11604,cbvm=4,pcv=147
    51636
    (0) e: 502 0 SQLBindCol:-
    hst=14254F0,icl=11,fct=99,rgv=E11924,cbvm=4,pcv=147
    52436
    (0) e: 359 0 SQLSetStmtOption:- hst=14254F0, fop=0 , vprm=0
    (0) e: 365 0 SQLExecute:- hst=14254F0
    (0) e: 396 0 SQLSetStmtOption:- hst=14254F0, fop=9 , vprm=100
    (0) e: 400 0 SQLExtendedFetch:- hstm=14254F0, fft=1, irow=0,
    pcrw=DF7AC8, rgr
    s=DFE90C
    (0) hoautil.c (561): ; Requested chunk length: 65536
    (0) SELECT "attachment" FROM "T_FLY_FLYER_REWARD" WHERE "pkid"=3 AND
    (0) "empid"=10004036 AND "startdate"={ts '2012-12-28 00:00:00.000'} AND
    (0) "enddate"={ts '2012-12-28 00:00:00.000'} AND "recate"='0' AND
    "retype"='0' AND
    (0) "rereson"='5858' AND "remark"='' AND "lastmodifier"='7' AND
    (0) "lastmodifidate"={ts '2012-12-28 10:41:03.070'} AND
    (0) "attachmentname"='飞行准备网一期演示沟通会议.doc
    (0) '
    (0) UPDATE "T_FLY_FLYER_REWARD" SET "attachment" = ? WHERE "pkid"=3 AND
    (0) "empid"=10004036 AND "startdate"={ts '2012-12-28 00:00:00.000'} AND
    (0) "enddate"={ts '2012-12-28 00:00:00.000'} AND "recate"='0' AND
    "retype"='0' AND
    (0) "rereson"='5858' AND "remark"='' AND "lastmodifier"='7' AND
    (0) "lastmodifidate"={ts '2012-12-28 10:41:03.070'} AND
    (0) "attachmentname"='飞行准备网一期演示沟通会议.doc
    (0) '
    (0) i: 924 0 SQLAllocConnect:- henv=1424718,phd=12E834
    (0) i: 931 0 SQLSetConnectOption:- hdbc=1424C30, fop=1218 , vprm=1
    (0) i: 938 0 SQLSetConnectOption:- hdbc=1424C30, fop=103 , vprm=0
    (0) i: 945 1 SQLDriverConnect:- hdbc=1424C30, hwnd=0, scsi=12E8C4,
    ccsi=-3, s
    cso=12E9C4, ccsom=1020, pcso=12E83A, fdc=0,
    (0) i: 955 0 SQLGetInfo:- hdbc=1424C30, fit=18 ,rif=12e840, civm=130,
    piv=12E
    83C
    (0) i: 960 0 SQLSetConnectOption:- hdbc=1424C30, fop=1217 , vprm=1
    (0) Created new MSSQLODBC connection (21122096)
    (0) e:1881 0 SQLAllocStmt:- hdbc=1424C30,pst=E1C678
    (0) e:1890 0 SQLSetStmtOption:- hst=14270A0, fop=0 , vprm=0
    (0) e:1896 0 SQLExecDirect:- hst=14270A0, css=-3
    (0) 6sss = SELECT "attachment" FROM "T_FLY_FLYER_REWARD"
    WHERE "pk
    id"=3 AND "empid"=10004036 AND "startdate"={ts '2012-12
    -28 00:
                    00:00.000'} AND "enddate"={ts '2012-12-28 00:00:00.000'}
    AND "
    recate"='0' AND "retype"='0' AND "rereson"='5858' AND
    "remark"
    ='' AND "lastmodifier"='7' AND "lastmodifidate"={ts
    '2012-12-2
                    8 10:41:03.070'} AND "attachmentname"='飞行准备网一期演
    示沟通? 嵋?doc '
    (0) e:1905 0 SQLDescribeCol:- hst=14270A0,icol=1,scn=
    (null),cnm=0,pcn=0,pst=1
    2EDDC,pcd=0,psc=0,pnul=0
    (0) e:1914100 SQLFetch:- hst=14270A0
    (0) i: 591100 SQLError:-
    hnv=1424718,hdbc=21122096,hst=14270a0,sss=00000,pne=
    12EB20,cemm=1239988,pem=1FF
    (0) =14247sem =
    (0) DB_MSSQLODBC_ENGINE (1916): ; (SQL State: 00000; SQL Code: 16)
    (0) DRV_BlobRead: (SQL State: 00000; SQL Code: 16)
    (0)
    (0) nvRETURN (F:\Work\Connect_4_6_3\src\drv\DRV_BLOB.C 249): -1
    (0) hoaftch (21): ; hoaftch Exited with retcode = 28500, hoadabrc = 1.
    (0) hoaclse (22): ; hoaclse Entered. id = 1.
    (0) e: 442 0 SQLFreeStmt:- hst=14254F0, fop=1
    (0) hoaclse (22): ; hoaclse Exited with retcode = 0.
    (0) hoadafr (23): ; hoadafr Entered. id = 1.
    (0) hoadafr (23): ; hoadafr Exited with retcode = 0.
    (0) hoaroll (12): ; hoaroll Entered. tflag = 1.
    (0) e:1353 0 SQLTransact:- henv=0,hdbc=14247C0, ftp=1
    (0) e:1359 0 SQLSetConnectOption:- hdbc=14247C0, fop=102 , vprm=1
    (0) hoaroll (12): ; hoaroll Exited with retcode = 0.
    (0) hoabegn (9): ; hoabegn Entered. formatID = 306206, hoagttln = 55,
    hoagttid =
    (0) ORCL.REGRESS.RDBMS.DEV.US.ORACLE.COM.f04eafd4.17.20.497, hoagtbln =
    10,
    (0) hoagtbid = , tflag = 0, initial = 0
    (0) e:1005 0 SQLGetConnectOption:- hdbc=14247C0, fop=102 , pvprm=12EA80
    (0) e:1007 0 SQLSetConnectOption:- hdbc=14247C0, fop=108 , vprm=1
    (0) e:1012 0 SQLSetConnectOption:- hdbc=14247C0, fop=102 , vprm=0
    (0) hoabegn (9): ; hoabegn Exited with retcode = 0.
    (0) hoapars (15): ; hoapars Entered. stmtType = 0, id = 1.
    (0) nvOUT (F:\Work\Connect_4_6_3\src\qp\QP_SQTXT.C 55): SELECT
    A1."attachment"
    (0) FROM "T_FLY_FLYER_REWARD" A1 WHERE A1."empid"=10000535
    (0) SELECT "A1"."attachmentname" AS c001, "A1"."lastmodifidate" AS
    c002, "A1"."lastmodifier" AS c003, "A1"."remark" AS c004, "A1"."rereson"
    AS c005, "A1"."retype" AS c006, "A1"."recate" AS c007, "A1"."enddate" AS
    c008, "A1"."startdate" AS c009, "A1"."empid" AS c010, "A1"."pkid" AS
    c011 FROM "T_FLY_FLYER_REWARD" "A1" WHERE ("A1"."empid" = 10000535)
    (0)
    (0) r: 74 0 SQLAllocStmt:- hdbc=14247C0,pst=12E7C0
    (0) r: 113 0 SQLPrepare:- hst=14254F0, css=14606780
    (0) Ssss = SELECT "A1"."attachmentname" AS c001,
    "A1"."lastmodifid
    ate" AS c002, "A1"."lastmodifier" AS c003, "A1"."remark"
    AS c0
    04, "A1"."rereson" AS c005, "A1"."retype" AS c006,
    "A1"."recat
    e" AS c007, "A1"."enddate" AS c008, "A1"."startdate" AS
    c009,
    "A1"."empid" AS c010, "A1"."pkid" AS c011 FROM
    "T_FLY_FLYER_RE
    WARD" "A1" WHERE ("A1"."empid" = 10000535)
    (0) r: 863 0 SQLNumResultCols:- hst=14254F0,pcol=11
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=1,scn=c001,cnm=64,pcn=12E6DE,p
    st=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=1,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=1,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=2,scn=c002,cnm=64,pcn=12E6DE,p
    st=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=2,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=2,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=3,scn=c003,cnm=64,pcn=12E6DE,p
    st=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=3,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=3,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=4,scn=c004,cnm=64,pcn=12E6DE,p
    st=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=4,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=4,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=5,scn=c005,cnm=64,pcn=12E6DE,p
    st=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=5,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=5,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=6,scn=c006,cnm=64,pcn=12E6DE,p
    st=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=6,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=6,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=7,scn=c007,cnm=64,pcn=12E6DE,p
    st=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=7,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=7,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=8,scn=c008,cnm=64,pcn=12E6DE,p
    st=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=8,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=8,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=9,scn=c009,cnm=64,pcn=12E6DE,p
    st=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=9,fdt=10,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=9,fdt=11,rgbd=0,cbdm=0,pcbd=
    0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=10,scn=c010,cnm=64,pcn=12E6DE,
    pst=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=10,fdt=10,rgbd=0,cbdm=0,pcbd
    =0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=10,fdt=11,rgbd=0,cbdm=0,pcbd
    =0,pfd=12E6E4
    (0) r: 886 0 SQLDescribeCol:-
    hst=14254F0,icol=11,scn=c011,cnm=64,pcn=12E6DE,
    pst=12E6F4,pcd=12E6EC,psc=12E6F0,pnul=12E6E8
    (0) r: 903 0 SQLColAttributes:-
    hst=14254F0,icol=11,fdt=10,rgbd=0,cbdm=0,pcbd
    =0,pfd=12E6E0
    (0) r: 909 0 SQLColAttributes:-
    hst=14254F0,icol=11,fdt=11,rgbd=0,cbdm=0,pcbd
    =0,pfd=12E6E4
    (0) r: 147 0 SQLFreeStmt:- hst=14254F0, fop=1
    (0) <<<<<<<<<<<<<<<<<<< Execution Strategy Begin
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<
    (0) Original SQL:
    (0) SELECT A1 . "attachment" FROM "T_FLY_FLYER_REWARD" A1 WHERE A1 .
    "empid" = 10000535
    (0)

  • How to convert rows to columns in sql server 2008

    How to convert rows to columns in sql server 2008 using the GROUP BY function? (only one query allowed)

    Lookup the Pivot transformation. From BOL:
    The Pivot transformation makes a normalized data set into a less normalized
    but more compact version by pivoting the input data on a column value. For
    example, a normalized Orders data set that lists customer name, product, and quantity purchased typically has multiple rows for any customer who purchased multiple products, with each row for that customer showing order
    details for a different product. By pivoting the data set on the product column, the Pivot transformation can output a data set with a
    single row per customer. That single row lists all the purchases by the customer, with the product names shown as column names, and the quantity shown as a value in the product column. Because not every customer purchases every product, many columns may contain
    null values.
    When a dataset is pivoted, input columns perform different roles in the pivoting process. A column can participate in the following ways:
    The column is passed through unchanged to the output. Because many input rows
    can result only in one output row, the transformation copies only the first
    input value for the column.
    The column acts as the key or part of the key that identifies a set of
    records.
    The column defines the pivot. The values in this column are associated with
    columns in the pivoted dataset.
    The column contains values that are placed in the columns that the pivot
    creates.
    Paul

  • Desc doesn't show datetime columns from SQl Server

    Hi Everyone,
    I have working db link to sql server using hsodbc:
    Oracle 10.2 on AIX using freetds odbc driver version 0.82.
    I can access tables on sql server but oracle sees only varchars and numerics columns in a table.
    Is there a way to select datetime columns from sql server using hsodbc?

    when hsodbc does not show a certain data type it is commonly related to the fact that HSODBC doesn't support the related ODBC data type.
    In general you have a data type in your SQL Server which is mapped to an ODBC data type by the ODBC driver. HSODBC then maps the ODBC data type to an Oracle equivalent and when the ODBC data type isn't supported by HSODBC it just drops it from the select list.
    So for a root cause analysis an ODBC trace is required to determine the mapping of the FreeTDS ODBC driver.
    With this info we can then compare the mapping documented in the HSODBC manual and if the ODBC data type isn't listed as a supported data type you then need to cast the data type on the source side to a different data type (for example varchar/char).
    So please post the ODBC trace and I'll have a look.
    - Klaus
    Edited by: kgronau on Apr 2, 2013 12:50 PM
    BTW, here the link to the HSODBC docu:
    http://docs.oracle.com/cd/B19306_01/server.102/b14232.pdf
    Oracle® Database
    Heterogeneous Connectivity Administrator's Guide
    10g Release 2 (10.2)
    B14232-01
    B.1 Mapping ANSI Data Types to Oracle Data Types Through an ODBC
    Interface

  • Import IMAGE type from SQL Server to BLOB in Oracle

    Hello,
    Is there a way to import a IMAGE type from SQL Server to BLOB type in Oracle from one table to another through a database link?
    I'm waiting for an answer as soon as possible.
    Best regards,
    Florin
    Edited by: Florin Manole on Sep 10, 2008 11:53 AM

    Have you already configured a Heterogeneous Services and Generic Connectivity to create a database link from Oracle to SQL Server? I haven't tried copying IMAGE data from SQL Server via Heterogeous Services myself, but from the [data type map|http://download.oracle.com/docs/cd/B19306_01/server.102/b14232/apb.htm#sthref509] in the documentation, I would expect that it would work so long as the SQL Server ODBC driver maps the IMAGE data type to SQL_LONGVARBINARY
    Justin

  • How to call procedure in Java from SQL Server Database

    Hello Every Body
    i Have Question about
    How to call procedure in Java from SQL Server Database
    Thanks

    Hi,
    have you tried a Google search? I just gave it a 3 second try and already found: http://stackoverflow.com/questions/6113674/how-do-i-execute-a-ms-sql-server-stored-procedure-in-java-jsp-returning-table-d
    Frank

  • Have trouble query after creating a linked server from SQL Server 2008 to EXCEL 2007

    I created a linked server from SQL Server 2008 Management Studio Express to an EXCEL 2007 workbook using:
    sp_addlinkedserver @server='LSERVER_EX0', @srvproduct='EXCELDATA', @provider='Microsoft.ACE.OLEDB.12.0', @datasrc='C:\Temp\abc.xlsx', @provstr='EXCEL 12.0'
    The linked server LSERVER_EX0 was created, but I cannot see any table(excel sheet), and when i ran the following to query tables,
    sp_tables_ex 'LSERVER_EX0'
    I got:Cannot obtain the schema rowset "DBSCHEMA_TABLES" for OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "LSERVER_EX0". The provider supports the interface, but returns a failure code when it is used.
    Any hint why?
    on another note, i was able to import the EXCEL sheets using the Import and Export Data wizard, but i cannot control the column data type and size in this way.

    Open management studio, goto "Server Objects"->"Linked Servers"->Providers, select the provider you use, right click it and in provider options, check "Allow inprocess".

  • Accessing IMAGE Columns in SQL Server

    I'm trying to use the TG4MSSQL to access tables in a SS2k database. All is well, except for 1 table that has an IMAGE column in it. I must say that I'm a little surprised and disappointed that the 10gR2 gateway for MSSQL apparently translates these things into LONG RAW columns, which are known to be antiquated and minimally supported. However, I still need access to the data, and ultimately, I need it in a BLOB. Doing simple queries (in TOAD) such as:
    select * from image@tg4ss where image_id = 1;
    returns the row, and I can use TOAD to determine that all the data is there. However, apparently, you cannot use PL/SQL to bind more than 32K of this data into a variable, so I haven't had much success there.
    The only way I know of converting a long raw to a blob is to use the to_lob function, but that's only good in the select list of a subquery of an insert statement. Thing is, that doesn't seem to work with the gateway. I tried something like:
    insert into my_blob_table( id, image )
    select id, to_lob(image) as image from image@tg4ss where id = 1;
    That gets me a ORA-00997: illegal use of LONG datatype.
    In fact, I can't even do this:
    insert into my_long_raw_table( id, image )
    select id, image from image@tg4ss where id = 1;
    I get the same error on that command.
    Now, I can do this, but I only get the first 32k of the image:
    begin
    for I in (select id, image from IMAGE@tg4ss)
    loop
    insert into my_long_raw_table( id, image )
    values (I.id, I.image);
    end loop;
    end;
    So, does anyone know how you can get image data out of an SQL Server database into a blob value? If so, I'd appreciate a reply. Thanks.
    -Rich.

    Hello Rich,
    I found your article after running into the same problem. I imagine you've dealt with this one way or another already but just in case...
    The reason the LONG RAW gets truncated is explained in:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/datatypes.htm#i43252
    Basically, LONG RAW variables are limited to 32760 bytes inside PL/SQL. The ORA-00997 error is explained a little in:
    http://www.dbaxchange.com/3_4_longdatatypes.htm
    The only solution I found to work was to create a Java utility that read in each LONG RAW value (one at a time) and then update a record in a table's BLOB column. This was even a bit tricky. I found the gateway would lock up if I tried to do too much at a time. I kept it simple my reading all column IDs into an array and then looping through the array while executing a simple select statement that retrieved the LONG RAW value. I concatenated the id to the end of the select statement because prepared statements seemed to be one of the reasons the gateway locked up. I used a ByteArrayInputStream object to populate the BLOB in an update prepared statement for each LONG RAW value processed in the loop.
    - Aaron

  • Move Image Data from Sql Server to Oracle

    I try to move Image data from a Sql Server Database to a Oracle Database.
    The dataType in Sql Server is Image and the target datatype in Oracle is BLOB.
    When I try to move my Sql Server data to Oracle I get the following error message
    Data Move information:Rows : 0 Errors: 76
    Commit failed: Getrennte Verbindung
    [InfogateSystem].[dbo].[ISErrorLogStepInfo] Getrennte Verbindung
    Anmeldung beim Server muß erfolgt sein
    [InfogateSystem].[dbo].[ISErrorLogStepInfo] ORA-00600: Interner Fehlercode, Argumente: [kokegPinLob1], [], [], [], [], [], [], []
    Getrennte Verbindung
    [InfogateSystem].[dbo].[ISErrorLogStepInfo] ORA-22275: invalid LOB locator specified Ungültigen LOB-Locator angegeben
    Inserting ' ' into column ISErrorLogStepInfo.ExtModulInfoSer (Row number 1)

    wow, you're getting a ora600 error here which is a bad sign for your database.
    I havent seen errors doing an online image data move, but I would diagnose the 600 error first and come back to us
    Barry

  • How to access the MDX application from SQL server when working with OBIEE?

    Hi,
    I am new to MS SQL Server 2005. We have developed the OLAP Cubes on SQL Server Business Intelligence Development Studio with its integration with Oracle Business Intelligence Enterprise Edition (OBIEE).
    The backend query is in MDX language. Now if I need to run that query I need to access the MDX Application, rite?
    So need to know how to connect to MDX application.
    Regards,

    Administration Tool: File - Import - "from multidimensional". There you choose "Provider Type" = "Analysis Server 2005". You specify the URL, user name and password. Then you can import MSAS cubes just like Essbase ones.
    Cheers

  • How to access the MDX application from SQL server?

    Hi,
    I am new to MS SQL Server 2005. We have developed the OLAP Cubes on SQL Server Business Intelligence Development Studio with its integration with Oracle Business Intelligence Enterprise Edition (OBIEE).
    The backend query is in MDX language. Now if I need to run that query I need to access the MDX Application, rite?
    So need to know how to connect to MDX application.
    Regards,

    I think that you have posted this query to the wrong forum. Try this one:
    Business Intelligence Suite Enterprise Edition
    --Andy                                                                                                                                                                                                                                                                                           

  • Read image data from SQL Server database and display it in a JSP web page

    Hi experts,
    I am doing a project in which I have to upload images to the database via JSP/servlets. I am able to do this.
    Now I want users to view and dowload these images which are stored in the database.
    Please help me of how can I read the images from the database and display it on jsp webpage and also can be downloaded by users via jsp pages on client side.
    Please help!

    Hi you may go through the below post to find what could be a better way to do that.
    http://forum.java.sun.com/thread.jspa?threadID=5163829
    REGARDS,
    RaHuL

  • How to convert rows into columns in sql server?

    Hi All,
    I have table called table1 which contains the below information
    Projectname           Weeks       Work
    p1                          w5            200
    p1                          w6            300
    p1                          w7            234
    p2                          w5            765
    p2                          w6            987
    p3                          w1            976
    p3                          w2            231
    I need to pivot this table. I need the info like below
    Projectname          w1        w2          w5          w6       
    w7
    p1                                                  
    200        300        234
    p2                                                  
    765         987
    p3                        976       231
    How can I make like this?

    One more way,
    create table #temp(Projectname varchar(10),Weeks varchar(10), Work int)
    insert into #temp values('p1','w5',200)
    insert into #temp values('p1','w6',300)
    insert into #temp values('p1','w7',234)
    insert into #temp values('p2','w5',765)
    insert into #temp values('p2','w6',987)
    insert into #temp values('p3','w1',976)
    insert into #temp values('p3','w2',231)
    Select ProjectName,
    Sum(Case when Weeks = 'W1' Then Work Else NULL End) W1,
    Sum(Case when Weeks = 'W2' Then Work Else NULL End) W2,
    Sum(Case when Weeks = 'W3' Then Work Else NULL End) W3,
    Sum(Case when Weeks = 'W4' Then Work Else NULL End) W4,
    Sum(Case when Weeks = 'W5' Then Work Else NULL End) W5,
    Sum(Case when Weeks = 'W6' Then Work Else NULL End) W6,
    Sum(Case when Weeks = 'W7' Then Work Else NULL End) W7
    From #temp
    Group by ProjectName
    Drop table #temp

  • Retrieve Image from SQL Server and Store in Oracle

    Hi All
    I want to retrieve the image stored in sql server as a image type and store that image to oracle as a BLOB type.
    I tried to retrive the image from sqlserver using getBytes and when storing to Oracle i have to type cast the byte array to BLOB then only it will be inserted please tell how to typecast byte array to BLOB.
    Or is there alternative way how to retrieve the image stored in sql server as a image type and store that image to oracle as a BLOB type.
    Regards
    Majid

    Hi Rajaram
    Thanks for UR Reply
    I tried what you have suggested but i am getting following exception
    java.lang.NullPointerException
    CDVLogger--getInstance--entered in ----getInstance----- null
    CDVLogger--getInstance--entered in ----logPrinter----- null
    CDVLogger--getInstance--entered in ----logger----- com.uttra.cdv.base.util.CDVLogger@b0ce8f
    at javax.sql.rowset.serial.SerialBlob.<init>(SerialBlob.java:82)
    at com.uttra.cdv.bulkimport.oracletca.image.FamilyMemberPhoto.createFamilyMemberPhotoRec(FamilyMemberPhoto.java:95)
    at com.uttra.cdv.bulkimport.oracletca.image.FamilyMemberPhoto.LoadFamilyMemberPhoto(FamilyMemberPhoto.java:55)
    at com.uttra.cdv.bulkimport.oracletca.image.FamilyMemberPhoto.main(FamilyMemberPhoto.java:136)
    Please Suggest

Maybe you are looking for

  • Question about document/literal web service

    Hello every body. I have some question about document/literal web service. I've been working with Axis before. Axis has four valid signatures for your message-style service methods: public Element [] method(Element [] bodies); public SOAPBodyElement

  • Where can I give my opinion and ideas of Mozilla layout?

    I want to know, because I want to help to improve Mozilla (in the things that I can), I mean, make Mozilla more friendly,more beauty,etc Thanks.

  • EPSON InkJet 4800 Pro, problems, please help!

    I was setting up an EPSON InkJet 4800 Pro on my client's network yesterday, I managed to successfully set it up on the network with Bonjour network, They had two systems running Leopard 10.5 over Wireless, One system running Tiger 10.4 connected via

  • Quick Time Player don't read the Apple Intermediate Codec

    Hi there: I have updated to Mavericks and now Quick Time Player don't read the Apple Intermediate Codec, needs convert the movie to Apple ProRess 422. I've installed Final Cut. Any ideas? tnxs!! Joseph

  • CS4 activation question

    Hi, I'm trying to get the serial number of my boss' installation of Adobe CS4 for the record. I don't have the CD. With CS3, I can deactivate the software without deleting the serial number and then open InDesign and get the activation number when it