Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: Re: Inserting values in to table with DBI

by !1 (Hermit)
on Dec 08, 2003 at 14:34 UTC ( [id://313088]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Inserting values in to table with DBI
in thread Inserting values in to table with DBI

How about doing a little research and try to find the equivalent of CONCAT for MS SQL Server? (which is the plus symbol (+) -- full description available here). So that would be:

INSERT into Disease_Types(Adapted_code) SELECT "A" + code from Disease_Types

Please learn to research and RTFM.

Update: Hmmm. Now that I read the rest of the discussion it seems you already know about +. However, look at the error message. 22001:

22001 - Data exception - string data right truncated.
Occurs when a char or varchar column is too short for the data being inserted or updated and non-blank characters must be truncated.

In other words, your Adapted_code field is too small. It seems you may need to alter the table structure.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://313088]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-24 02:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found