Viewing 15 posts - 301 through 315 (of 683 total)
It's a little annoying, but you either have to write the whole case statement out again in your where clause, or you have to use a derived table. e.g.
July 25, 2006 at 11:25 am
Here's an article on this subject...
July 25, 2006 at 11:17 am
Google is your friend:
http://www.google.co.uk/search?hl=en&q=create+insert+statements
Returns a whole heap of good stuff on the first page, including:
http://www.databasejournal.com/scripts/article.php/1502051
July 25, 2006 at 11:12 am
Glad to help - thanks for the feedback. It's often the easy things which stump us...
July 25, 2006 at 10:30 am
I've just read what Vasc has written, and I agree with that approach. I just wanted some answers first
A further question is why...
July 25, 2006 at 10:21 am
Some questions...
1. Does this proc compile?
2. You have a ROLLBACK TRANSACTION but no begin or commit tran? Can you explain?
3. You are trying to create a table in your sproc?...
July 25, 2006 at 10:18 am
I'm confused. Have you tried this?
dbo.function(param)
July 25, 2006 at 10:04 am
But Shabu doesn't want to format data?
He wants to change the datatype of an existing varchar column to datetime.
He's got issues with doing that...
July 25, 2006 at 6:13 am
Okay - that sounds like there's some data in there which is not valid datetime data.
Try running...
select dateofbirth from mytable where isdate(dateofbirth) = 0
If there are some...
July 24, 2006 at 10:30 am
This works fine for me (the bit in purple is the bit you need)...
--data
set nocount on
create table #t1 (dateofbirth varchar(30))
insert #t1
select '1 jan 2000'
union all...
July 24, 2006 at 10:17 am
Or...
--data
declare @t table (seq int, area int, page int)
insert @t
select 1, 300, 0
union all select 1, 200, 0
union all select 1, 100, 0
union all select...
July 24, 2006 at 10:06 am
No. That's not possible. You can only update one table at a time unless that table has triggers which update other tables.
I suspect you just need to do this...
July 24, 2006 at 9:57 am
But your 'being lazy', Jeff, is most people's 'working my arse off'
July 24, 2006 at 6:22 am
Ah, yes! I looked in BOL and missed 105
Thanks Karl
Cláudia - use that instead of 103 with...
July 24, 2006 at 6:15 am
Hear, hear!
Here's a simple example. If you give us the 'bigger picture', we'll be able to show you the best tricks to achieve what you need.
July 24, 2006 at 6:11 am
Viewing 15 posts - 301 through 315 (of 683 total)