CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
PERL + SQL VARCHAR(MAX)

 



sriharsha_12
Novice

Oct 26, 2010, 8:25 PM

Post #1 of 9 (4729 views)
PERL + SQL VARCHAR(MAX) Can't Post

In db table i have defined a column as varchar(max)...

when i fetch this column using perl DBI it is not returning any value..

query1 : select columna from table1
--> columna is varchar(max)
query1 didt return anything

where as columnb in same table which is varchar(8000), returns the value.

so i tried type casting on columna,
query2 : select cast(columna as varchar(8000)) as colA from table1
query2 : this worked.

but my data in this column is exceding 8000 chars...so i tried this,
query3 : select cast(columna as varchar(max)) as colA from table1
no error msg, no warning, it just returned nothing.

Any Solution?


(This post was edited by sriharsha_12 on Oct 26, 2010, 8:26 PM)


sriharsha_12
Novice

Nov 21, 2010, 10:26 PM

Post #2 of 9 (4617 views)
Re: [sriharsha_12] PERL + SQL VARCHAR(MAX) [In reply to] Can't Post

guys any clues?
i'm still facing the problemFrown


sriharsha_12
Novice

Dec 14, 2010, 11:40 PM

Post #3 of 9 (4463 views)
Re: [sriharsha_12] PERL + SQL VARCHAR(MAX) [In reply to] Can't Post

is my question clear?
did any of you guys face this problem?


BillKSmith
Veteran

Dec 15, 2010, 12:34 PM

Post #4 of 9 (4403 views)
Re: [sriharsha_12] PERL + SQL VARCHAR(MAX) [In reply to] Can't Post

Your question is clear enough. It seem to be a SQL problem, not a perl problem. Does your SQL work without perl? If so, I would suspect the installation and setup of your perl modules. Sorry, I can't offer any more help.
Good Luck,
Bill


sriharsha_12
Novice

Dec 22, 2010, 2:26 AM

Post #5 of 9 (3990 views)
Re: [BillKSmith] PERL + SQL VARCHAR(MAX) [In reply to] Can't Post

sql works fine with and without perl. only with varchar(max) i'm having the issue.

whenever i use this varchar(max) nothing is returned....


BillKSmith
Veteran

Dec 22, 2010, 9:17 PM

Post #6 of 9 (3966 views)
Re: [sriharsha_12] PERL + SQL VARCHAR(MAX) [In reply to] Can't Post

I meant to ask it your select statement, with the varchar(max), works correctly without perl. If it does not, your problem has nothing to do with perl. I do not know enough to offer any other real help. I am making a wild guess that max is not defined. If true, it is more likely a data base problem than a perl problem.
Good Luck,
Bill


sriharsha_12
Novice

Dec 22, 2010, 10:30 PM

Post #7 of 9 (3963 views)
Re: [BillKSmith] PERL + SQL VARCHAR(MAX) [In reply to] Can't Post

yes it works fine.


BillKSmith
Veteran

Dec 23, 2010, 8:54 AM

Post #8 of 9 (3936 views)
Re: [sriharsha_12] PERL + SQL VARCHAR(MAX) [In reply to] Can't Post

All I can suggest is to check for column width limits in he documentation of DBI and all the related modules that you actually use. I cannot offer a lot of hope.
Good Luck,
Bill


sriharsha_12
Novice

Dec 23, 2010, 7:00 PM

Post #9 of 9 (3912 views)
Re: [BillKSmith] PERL + SQL VARCHAR(MAX) [In reply to] Can't Post

ok..let me try that...

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives