Viewing 15 posts - 13,741 through 13,755 (of 13,848 total)
Not quite sure I understand what you're trying to do. You say that this is an INSERT trigger - ie a trigger which is run when a new record...
August 19, 2004 at 7:56 pm
Anne's nearly got it.
Try this:
select replace(convert(varchar(12),getdate(),114),':','')
Regards
Phil
August 18, 2004 at 9:24 pm
Presumably you have a reason for using fixed-width files rather than [tab] or [comma] delimited? A mainframe background, perhaps ![]()
When you open the fixed-width...
August 18, 2004 at 7:55 pm
Here's another version that does not require any joins:
Select ClientID from ClientRegs
where RegionID = 1 or RegionID = 28
group by ClientID
having count(ClientID) > 1
Regards
Phil
August 18, 2004 at 6:35 pm
Hi Val
It seems that your original statement is nearly giving you what you want, except that you have spaces where you want zeroes to appear. So can you just...
August 18, 2004 at 6:26 pm
Not sure how you are achieving this - Enterprise Manager or Query Analyser? I would expect the sp_rename stored procedure to work the fastest via QA. It was...
August 17, 2004 at 11:40 pm
Hi Bernard - what sort of constraint? Some constraints (eg PK, FK) do not need to be dropped before renaming fields.
Otherwise, can't you just drop the constraint, rename the...
August 17, 2004 at 10:53 pm
I must admit - I just assumed that a field called GivenName would be a string ![]()
DATALENGTH is a more general function, as it...
August 17, 2004 at 1:55 am
If I work on the assumption that you have a table 'tblNewRecords' that contains the daily updates, you can work along these lines:
--First do the updates
update all
set all.* = new.*...
August 16, 2004 at 5:54 pm
Sounds like a process/application change to me. Hardware should have nothing to do with this.
As far as testing for invisible characters is concerned, you were on the right track...
August 15, 2004 at 11:41 pm
Could it be a zero-length string? Try running
select *
from table where id = 12345 and GivenName = ''
If the record is still returned, you've cracked it.
Regards
Phil
August 15, 2004 at 10:34 pm
Hi Maria
Something like this gets rid of the cursor and does everything in far fewer statements:
update wtp
set MinDate = (SELECT min(wtf.create_dt) FROM WT_ESPP_FACT wtf
...
August 12, 2004 at 1:17 am
Hi Maria, had a quick look at this and I think it can be re-coded, without needing a cursor and using fewer lines of code. However, no time at...
August 10, 2004 at 10:54 pm
Can you expand a bit on what your problem is? Many people here try to avoid cursors as much as possible, for performance reasons, but sometimes you just have...
August 10, 2004 at 10:23 pm
Viewing 15 posts - 13,741 through 13,755 (of 13,848 total)