Viewing 15 posts - 646 through 660 (of 682 total)
Running the line below gives you various ip config details:
exec master..xp_cmdshell 'ipconfig'
...so you just need to strip out what you want:
declare @ip_row varchar(255)
declare @ip_address varchar(20)
set...
January 13, 2006 at 6:40 am
Hi Oren,
The documentation says 'A view can be referenced only by an INSTEAD OF trigger.':
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_create2_7eeq.asp
So try:
create trigger test
on testview
instead of update
as
begin
doing...
January 5, 2006 at 5:04 am
Have you tried it Jeff? That doesn't seem to work for me...
January 4, 2006 at 3:20 am
Oops... datetime, rather than date...
...order by cast(tl.Date as datetime) asc
January 3, 2006 at 6:21 am
2 things which work (although they're not entirely satisfactory) are:
1. Use a different alias:
select SUBSTRING(CAST(tl.Date as nvarchar), 0, 12) as 'MyDate'...
2. Cast it back to a date:
January 3, 2006 at 4:58 am
Erm, how about:
select count(*) from (select A from table_name group by A) a
January 3, 2006 at 3:23 am
Or this:
select count(distinct A) from table_name
It returns: 3
January 3, 2006 at 3:06 am
Hi Subhash,
If you get your data into a SQL table, you can do something like the following (this SQL is safe to run):
create table #t (DocNumber int, c706000...
December 30, 2005 at 6:05 am
Hi Naveed,
I think the code below does the trick. It is safe to run the whole thing.
I usually find it easier to manage this kind of historical data if an...
December 28, 2005 at 8:08 am
Jeff - I think that may not work for the 3.445657545 example (which should go to 3.45).
Here's an alternative (non-looping) solution:
CREATE FUNCTION dbo.RoundBanker (@x money, @DecimalPlaces tinyint)...
December 28, 2005 at 6:28 am
You can do the same kind of thing:
--select between position 4 and the first number after position 4
Declare @TestData varchar(20)
Set @TestData = 'U2-GED 34039'
Select...
December 6, 2005 at 7:02 am
Here's the full answer, I think - again using the INFORMATION_SCHEMA. I've built it up a bit at a time (using table variables) so it's easier to understand.
November 24, 2005 at 5:24 am
Take out the "CONSTRAINT [PK_RP_Temp]" bit of your query, and I think it should all work fine.
November 24, 2005 at 4:27 am
How's this?
CREATE TABLE #T1 (
l_id char(3) not null,
v_id char (12) not null,
diag_code char (5) not null,
diag_desc varchar (10) null,
seq_nbr char (2) not null,
c_id char (12) not null,
createdate...
October 28, 2005 at 9:34 am
Take a look at this article that I wrote a few years ago...
http://www.sqlservercentral.com/columnists/rrandall/creatingascriptfromastoredprocedure.asp
The full title was originally 'Creating a 'Create Table' script from a stored procedure', but it got...
October 28, 2005 at 8:49 am
Viewing 15 posts - 646 through 660 (of 682 total)