MySQL Forums
Forum List  »  PHP

Re: Column count doesn't match value count at row 1???????
Posted by: Leo Aulenta
Date: June 24, 2008 03:33AM

This is the destination table

idTranscript VARCHAR(20)
idExon VARCHAR (20)
TranscriptID INT
ExonID INT
RunID INT
polyA TINYINT(1)
PAS TINYINT(1)

and this is the one from where i'd like to take the information and concat 3 tables in 2 different without removing the orignial one and the new will have their informations separated by "-"

TranscriptID INT
ExonID INT
RunID INT
polyA TINYINT(1)
PAS TINYINT(1)

the query that with these 2 tables doesn't work

INSERT INTO amaca.Transcript_Exon
SELECT concat(ADB.TranscriptID, '-', ADB.RunID) as idTranscript,ADB.* FROM AspicDB.Transcript_Exon as ADB

and this doesn't work too
INSERT INTO amaca.Transcript_Exon
SELECT concat(ADB.RunID, '-', ADB.ExonID) as idExon,ADB.* FROM AspicDB.Transcript_Exon as ADB


i want to add that with 2 tables of this kind:
Input table:
TranscriptID
RunID
NrExons
TranscriptLength
VariantType
CHR
CHRStart
CHREnd
CDSStart
CDSEnd
ReferenceCDSStartStop
ReferenceFrame
polyA
PAS
NMD

Destination Table

idTranscript VARCHAR(20)
TranscriptID VARCHAR(10)
RunID INT
NrExons INT
TranscriptLength INT
VariantType TEXT
CHR VARCHAR(2)
CHRStart INT
CHREnd INT
CDSStart INT
CDSEnd INT
ReferenceCDSStartStop VARCHAR(10)
ReferenceFrame VARCHAR(10)
polyA CHAR(1)
PAS CHAR(1)
NMD CHAR(1)

in this case thie query works
INSERT INTO amaca.Transcript
SELECT concat(ADB.RunID, '-', ADB.TranscriptID) as idTranscript,ADB.* FROM AspicDB.Transcript as ADB

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.