in reply to Re: Insert into DB problem
in thread Insert into DB problem

I need those periods there because I am inserting into a differnt database than selecting from. The query is as follows:
Insert into MeterMusicTemp..QCStuff Select dictid,filename, 'SAVE A HORSE (RIDE A COWBOY)' from (select dictid, filename, artist, title, song, path, hholdid, updated_by, filesize from FMDATAFILE3 where PPMonth=424 and (RuleID >= 70 and RuleID < 80) and dictid in (select dictid from dictionary d, artist a, song s where d.artistid=a.artistid and d.songid=s.songid and artist='BIG & RICH' and song = 'SAVE A HORSE (RIDE A COWBOY)') and matchlevel<3) as T1 where lower(FileName) not like lower('%SAVE A HORSE (RIDE A COWBOY)%') + order by filename
Thanks, PJOfNJ

Replies are listed 'Best First'.
Re^3: Insert into DB problem
by jZed (Prior) on May 25, 2005 at 16:09 UTC
    I need those periods there because I am inserting into a differnt database than selecting from.

    I don't know about whatever DBMS you're using, but ANSI SQL syntax for qualified table names is Catalog.Schema.Table or Schema.Table or Table. I suspect that what you are calling a database is a Schema and therefore you only want one period. If what you are calling a database is a catalog, then I suspect you need to put the Schema name between the two periods.