<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Query base64 data from SQL into the jmp table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Query-base64-data-from-SQL-into-the-jmp-table/m-p/744259#M92394</link>
    <description>&lt;P&gt;Is this a database or CSV import?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If an SQL database, these might be useful.&lt;/P&gt;
&lt;P&gt;&lt;LI-MESSAGE title="Byte Array Image from Database to JMP" uid="16612" url="https://community.jmp.com/t5/Discussions/Byte-Array-Image-from-Database-to-JMP/m-p/16612#U16612" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-MESSAGE title="downloading large columns from database via odbc" uid="337111" url="https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/337111#U337111" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this is CSV data, how are you opening it? Sharing the open() statement or dialog might help. Also the Source script from the bad import. JMP should be able to read very large strings; how did you determine the length of the imported string?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a quick test using open(...csv)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;x = "1," || Encode64 Blob( Char To Blob( Repeat( "the quick brown fox", 30000 ) ) ) || ",3"; Show( Length( x ) );
y = "4," || Encode64 Blob( Char To Blob( Repeat( "jumps over the lazy", 30000 ) ) ) || ",6"; Show( Length( y ) );
file = Save Text File( "$temp/x.csv", "a,b,c\!n" || x || "\!n" || y );
dt = Open( file );
Show(
	JMP Version(),
	Length( dt:b[1] ),
	Length( dt:b[2] ),
	Blob Peek( Decode64 Blob( dt:b[1] ), 0, 38 ),
	Blob Peek( Decode64 Blob( dt:b[2] ), 0, 38 )
);
/*
Length(x) = 760004;
Length(y) = 760004;
JMP Version() = "17.2.0";
Length(dt::b[1]) = 760000;
Length(dt::b[2]) = 760000;
Blob Peek(Decode64 Blob(dt::b[1]), 0, 38) = Char To Blob( "the quick brown foxthe quick brown fox", "ascii~hex" );
Blob Peek(Decode64 Blob(dt::b[2]), 0, 38) = Char To Blob( "jumps over the lazyjumps over the lazy", "ascii~hex" );
*/&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="(a lot of) base 64 data in middle column" style="width: 577px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/63064i728803D415DBFF95/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture.png" alt="(a lot of) base 64 data in middle column" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;(a lot of) base 64 data in middle column&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;the Source script looks like this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Open(
	"$TEMP/x.csv",
	columns(
		New Column( "a", Numeric, "Continuous", Format( "Best", 12 ) ),
		New Column( "b", Character, "Nominal" ),
		New Column( "c", Numeric, "Continuous", Format( "Best", 12 ) )
	),
	Import Settings(
		End Of Line( CRLF, CR, LF ),
		End Of Field( Comma, CSV( 1 ) ),
		Strip Quotes( 0 ),
		Use Apostrophe as Quotation Mark( 0 ),
		Use Regional Settings( 0 ),
		Scan Whole File( 1 ),
		Treat empty columns as numeric( 0 ),
		CompressNumericColumns( 0 ),
		CompressCharacterColumns( 0 ),
		CompressAllowListCheck( 0 ),
		Labels( 1 ),
		Column Names Start( 1 ),
		First Named Column( 1 ),
		Data Starts( 2 ),
		Lines To Read( "All" ),
		Year Rule( "20xx" )
	)
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 04 Apr 2024 02:37:26 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2024-04-04T02:37:26Z</dc:date>
    <item>
      <title>Query base64 data from SQL into the jmp table</title>
      <link>https://community.jmp.com/t5/Discussions/Query-base64-data-from-SQL-into-the-jmp-table/m-p/744098#M92377</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm trying to import base64 encoded data into JMP, but it seems to be truncating the data at 255 characters. The database column containing the base64 string has a length of 546,168 characters. Is there a way to increase the character limit for the jmp table column?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jackie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 19:27:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Query-base64-data-from-SQL-into-the-jmp-table/m-p/744098#M92377</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2024-04-03T19:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: Query base64 data from SQL into the jmp table</title>
      <link>https://community.jmp.com/t5/Discussions/Query-base64-data-from-SQL-into-the-jmp-table/m-p/744199#M92385</link>
      <description>&lt;P&gt;I suspect you will want to use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1712180562871.png" style="width: 621px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/63048i0D97ECB4D3DEE4AD/image-dimensions/621x277?v=v2" width="621" height="277" role="button" title="txnelson_0-1712180562871.png" alt="txnelson_0-1712180562871.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I believe it can handle an input stream of up to 2 Billion characters.&amp;nbsp; Check in the Scripting Index for examples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 21:45:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Query-base64-data-from-SQL-into-the-jmp-table/m-p/744199#M92385</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-04-03T21:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Query base64 data from SQL into the jmp table</title>
      <link>https://community.jmp.com/t5/Discussions/Query-base64-data-from-SQL-into-the-jmp-table/m-p/744259#M92394</link>
      <description>&lt;P&gt;Is this a database or CSV import?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If an SQL database, these might be useful.&lt;/P&gt;
&lt;P&gt;&lt;LI-MESSAGE title="Byte Array Image from Database to JMP" uid="16612" url="https://community.jmp.com/t5/Discussions/Byte-Array-Image-from-Database-to-JMP/m-p/16612#U16612" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-MESSAGE title="downloading large columns from database via odbc" uid="337111" url="https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/337111#U337111" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this is CSV data, how are you opening it? Sharing the open() statement or dialog might help. Also the Source script from the bad import. JMP should be able to read very large strings; how did you determine the length of the imported string?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a quick test using open(...csv)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;x = "1," || Encode64 Blob( Char To Blob( Repeat( "the quick brown fox", 30000 ) ) ) || ",3"; Show( Length( x ) );
y = "4," || Encode64 Blob( Char To Blob( Repeat( "jumps over the lazy", 30000 ) ) ) || ",6"; Show( Length( y ) );
file = Save Text File( "$temp/x.csv", "a,b,c\!n" || x || "\!n" || y );
dt = Open( file );
Show(
	JMP Version(),
	Length( dt:b[1] ),
	Length( dt:b[2] ),
	Blob Peek( Decode64 Blob( dt:b[1] ), 0, 38 ),
	Blob Peek( Decode64 Blob( dt:b[2] ), 0, 38 )
);
/*
Length(x) = 760004;
Length(y) = 760004;
JMP Version() = "17.2.0";
Length(dt::b[1]) = 760000;
Length(dt::b[2]) = 760000;
Blob Peek(Decode64 Blob(dt::b[1]), 0, 38) = Char To Blob( "the quick brown foxthe quick brown fox", "ascii~hex" );
Blob Peek(Decode64 Blob(dt::b[2]), 0, 38) = Char To Blob( "jumps over the lazyjumps over the lazy", "ascii~hex" );
*/&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="(a lot of) base 64 data in middle column" style="width: 577px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/63064i728803D415DBFF95/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture.png" alt="(a lot of) base 64 data in middle column" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;(a lot of) base 64 data in middle column&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;the Source script looks like this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Open(
	"$TEMP/x.csv",
	columns(
		New Column( "a", Numeric, "Continuous", Format( "Best", 12 ) ),
		New Column( "b", Character, "Nominal" ),
		New Column( "c", Numeric, "Continuous", Format( "Best", 12 ) )
	),
	Import Settings(
		End Of Line( CRLF, CR, LF ),
		End Of Field( Comma, CSV( 1 ) ),
		Strip Quotes( 0 ),
		Use Apostrophe as Quotation Mark( 0 ),
		Use Regional Settings( 0 ),
		Scan Whole File( 1 ),
		Treat empty columns as numeric( 0 ),
		CompressNumericColumns( 0 ),
		CompressCharacterColumns( 0 ),
		CompressAllowListCheck( 0 ),
		Labels( 1 ),
		Column Names Start( 1 ),
		First Named Column( 1 ),
		Data Starts( 2 ),
		Lines To Read( "All" ),
		Year Rule( "20xx" )
	)
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Apr 2024 02:37:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Query-base64-data-from-SQL-into-the-jmp-table/m-p/744259#M92394</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2024-04-04T02:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Query base64 data from SQL into the jmp table</title>
      <link>https://community.jmp.com/t5/Discussions/Query-base64-data-from-SQL-into-the-jmp-table/m-p/744391#M92409</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;I am quering from the Database server into JMP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to convert it into Hexadecimal, yet it only reads up to 255 characters&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Query:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;ODBC = Create Database Connection( "DSN=xxx;" );
SQL= Eval Insert(
	
   "SELECT hex(plot) AS HexadecimalPlot
FROM db.main.plot_table;");
dt_diesort2 = Execute SQL( ODBC, SQL, "Pic_table" );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here is what I end up with:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jackie__1-1712238262189.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/63075iD7C8E9B4D0B4F22C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jackie__1-1712238262189.png" alt="Jackie__1-1712238262189.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;JMP reads limits til 255 char&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;"89504E470D0A1A0A0000000D4948445200000DAC000007D0080600000094E2F9EB0000200049444154785EECDD07905545DA3FE0171024A818565D3388A262465D54CC3960045D54740D8062C29C3127CC8B8A39E79CF39A139815B3A288620EA0E420FFEABB9FFB37CCBD3373A7679881A7ABBEFAB68AD36F773FA7E7CE19E"&lt;BR /&gt;&lt;BR /&gt;I have attached the original hex values that I want to query in the jmp table.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 13:44:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Query-base64-data-from-SQL-into-the-jmp-table/m-p/744391#M92409</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2024-04-04T13:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Query base64 data from SQL into the jmp table</title>
      <link>https://community.jmp.com/t5/Discussions/Query-base64-data-from-SQL-into-the-jmp-table/m-p/744421#M92414</link>
      <description>&lt;P&gt;What brand of database might help.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.jmp.com/t5/Discussions/Byte-Array-Image-from-Database-to-JMP/m-p/16612#M15136" target="_blank"&gt;https://community.jmp.com/t5/Discussions/Byte-Array-Image-from-Database-to-JMP/m-p/16612#M15136&lt;/A&gt; seems like it answers a similar question&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;***make sure your odbc drivers are up-to-date***&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I'm not a database expert, but if the data is &lt;EM&gt;&lt;STRONG&gt;in&lt;/STRONG&gt;&lt;/EM&gt; the database and the &lt;EM&gt;&lt;STRONG&gt;query&lt;/STRONG&gt;&lt;/EM&gt; is truncating it, maybe something here will help.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sqlservercentral.com/forums/topic/255-char-limitation" target="_blank"&gt;https://www.sqlservercentral.com/forums/topic/255-char-limitation&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/19984934/why-a-long-text-field-is-returning-only-255-characters-in-a-ms-access-2013-query" target="_blank"&gt;https://stackoverflow.com/questions/19984934/why-a-long-text-field-is-returning-only-255-characters-in-a-ms-access-2013-query&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://board.phpbuilder.com/d/10329740-mssql-255-characters-limit-in-select/9" target="_blank"&gt;https://board.phpbuilder.com/d/10329740-mssql-255-characters-limit-in-select/9&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/office/troubleshoot/access/linked-table-data-truncated" target="_blank"&gt;https://learn.microsoft.com/en-us/office/troubleshoot/access/linked-table-data-truncated&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 14:15:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Query-base64-data-from-SQL-into-the-jmp-table/m-p/744421#M92414</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2024-04-04T14:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Query base64 data from SQL into the jmp table</title>
      <link>https://community.jmp.com/t5/Discussions/Query-base64-data-from-SQL-into-the-jmp-table/m-p/750359#M93117</link>
      <description>&lt;P&gt;Thank you so much for the solution.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2024 12:12:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Query-base64-data-from-SQL-into-the-jmp-table/m-p/750359#M93117</guid>
      <dc:creator>MorganRamirez</dc:creator>
      <dc:date>2024-04-27T12:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Query base64 data from SQL into the jmp table</title>
      <link>https://community.jmp.com/t5/Discussions/Query-base64-data-from-SQL-into-the-jmp-table/m-p/750363#M93119</link>
      <description>&lt;P&gt;Welcome, and which part worked for you? Thanks for any details you can share. Everybody struggles with database connections.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2024 14:47:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Query-base64-data-from-SQL-into-the-jmp-table/m-p/750363#M93119</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2024-04-27T14:47:32Z</dc:date>
    </item>
  </channel>
</rss>

