Well, I don't know about Oracle. However, in SQL Server, if a row has an IDENTITY column, you just omit that column from your INSERT statement and SQL auto-populates the column for you.
Richard D. Cushing
Sr. Consultant
SYNERGISTIC SOFTWARE SOLUTION, LLC
A Wholly-owned subsidiary of BDO...
Try this:
select case datepart(m,OpenDate)
when 1 then 'Jan'
when 2 then 'Feb'
when 3 then 'Mar'
when 4 then 'Apr'
when 5 then 'May'
when 6 then 'Jun'
when 7 then 'Jul'
when 8 then 'Aug'
when 9 then 'Sep'
when 10 then 'Oct'
when 11 then 'Nov'
when 12 then 'Dec'
else '*** Error ***'...
You say that assessment.record_id is "auto generated", but if it is failing when trying to insert NULL, it clearly is not auto-generated by SQL (as an Identity column would be). How is [record_id] auto-generated?
Richard D. Cushing
Sr. Consultant
SYNERGISTIC SOFTWARE SOLUTION, LLC
A...
The "Bind error" appears to be related to your attempting to bind a column from the data source that is longer than the destination column in SQL Server. You will likely need to truncate values in the column in the E-T-L process.
Here's Microsoft's answer to your Error 1204:
ACTION:
Either...
Try this:
select c.*
, (select Phone
from Telephones t
where t.ClientID = c.ClientID
and t.PhoneType = 'Work') as WorkPhone
, (select Phone
from Telephones t
where t.ClientID = c.ClientID
and t.PhoneType = 'Mobile') as MobilePhone
, (select Phone
from Telephones t...
I agree with SQLSister: Try...
select cast(Schedule.AAGRNUM as varchar(100)) + ' #' + cast(Schedule.Schedule_Number as varchar(100)) as Agreement_Number
See what happens.
Richard D. Cushing
Sr. Consultant
SYNERGISTIC SOFTWARE SOLUTION, LLC
A Wholly-owned subsidiary of BDO Seidman, LLP
Would something like this work for you?
select *
into #temp
from assessment
update assessment
set ABC = '11/30/2008'
where ABC > '12/1/2008'
insert into a
( XYZ
, <OtherField>
, <OtherField>
)
select '12/1/2008'
, <OtherData>
, <OtherData>
from #Temp t
[inner/right outer] join assessment a
on...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.