Showing posts with label values. Show all posts
Showing posts with label values. Show all posts

Tuesday, March 27, 2012

@@Identity

Does this only work with an identity column?

my :

INSERT INTO [Contacts].[ekr].[Usrs]([id], [Uid], [Pw], [writ], [Maint])
VALUES(7, 'MM', 'WW', 1, 0)

IF @.@.ERROR > 0
RAISERROR('String, Severity level, State',16,122)
ELSE
SELECT @.@.Identity as NewOne

Returns : NewOne
NULLYes. See the BOL entry on @.@.Identity.

Regards,

hmscott

Does this only work with an identity column?

my :

INSERT INTO [Contacts].[ekr].[Usrs]([id], [Uid], [Pw], [writ], [Maint])
VALUES(7, 'MM', 'WW', 1, 0)

IF @.@.ERROR > 0
RAISERROR('String, Severity level, State',16,122)
ELSE
SELECT @.@.Identity as NewOne

Returns : NewOne
NULL

Thursday, March 22, 2012

on Check Constraint expressions

I am creating a check constraint on a field (GRID_NBR) for values between 1 & 99. I am a little confused on creating the expression for it (Books online is vague).

Can I use the following expression: GRID_NBR BETWEEN 1 AND 99

Or do I have to use: GRID_NBR > 0 AND GRID_NBR < 100

Thanks!I am creating a check constraint on a field (GRID_NBR) for values between 1 & 99. I am a little confused on creating the expression for it (Books online is vague).

Can I use the following expression: GRID_NBR BETWEEN 1 AND 99

Or do I have to use: GRID_NBR > 0 AND GRID_NBR < 100

Thanks!

I found my own answer (in Books Online)...here's the example it gave on the Constraint page...

CREATE TABLE cust_sample
(
cust_id int PRIMARY KEY,
cust_name char(50),
cust_address char(50),
cust_credit_limit money,
CONSTRAINT chk_id CHECK (cust_id BETWEEN 0 and 10000 )
)

Tuesday, March 20, 2012

:new.<variable_name>

I am trying to write an 'after insert' trigger for a very dynamic database that inserts all the new values put into a table into an audit table. To do this, I have to write :new.col1, :new.col2, :new.col3 etc into the audit table. I have a loop that puts ['col1','col2','col3', etc.] into a variable named column_name, but I don't seem to be able to dynamically generate the variable name. I guess I am looking for something like an eval function in PL/SQL that could do

stmt := 'new_value := :new.'||column_name;
eval(stmt);
insert into audit_table (:new.id,column_name,new_value,SYSDATE);

But I haven't found it yet, and I can't select column_name from table_name because table 'table_name' is mutating and Oracle won't let you select on a table that is changing. If anyone can help, it would be greatly appreciated. Thanks in advance.Hello,

I dont know such a command in PL/SQL ... but what do you think about dynamic SQL. Use the package methods DMBS_SQL.

I hope this helps ?

Greetings
Manfred Peter
(Alligator Company)
http://www.alligatorsql.com|||Hey, I can use dynamic SQL for something like the following

sql_stmt = 'select :col_name from :table_name where id=:id';
execute immediate into new_value using col_name, table_name, id

But this is an actual PL/SQL statement that I need to build on the fly like this

stmt := 'new_value=:new.'||col_name;
eval(stmt);
insert into audit_table values(:new.id,new_value,SYSDATE,col_name);

Any thoughts would be greatly appreciated. Thanks.|||Hello,

whats about

DECLARE
cVar VARCHAR2(500) := 0;
BEGIN
cVar := 'DECLARE ' ||
' cThis VARCHAR2(200) := ''' ||
'BEGIN ' ||
' cThis := :new.' || column_name ||
' INSERT INTO and so on and so on ' ||
'END;';

.
.
.
do the dynamic stuff
.
.
.

END;

Is this what you want to do ?

Greetings
Manfred Peter
(Alligator Company)
http://www.alligatorsql.com

Sunday, March 11, 2012

.rdlc reports - add values through textbox name?

hi all

have a .rdlc report like an invoice.

how can i add the values in my textboxes by the Name property of the Text Box.

like txtSubTotal.Text + txtTax.Text + txtShipping.Text. ?

all those fields are populated with calculations that run on the dataset and all have values. I just cant seem to write the proper syntax to add by control names, rather than field names.

well youshould use this syntax

ReportItems!txtSubTotal.Value + ReportItems!txtTax.Value + ReportItems!txtShipping.Value

NB: this wouldn't work whih agregiate functions unless used in a header or footer

Hope this help

|||

Yes I couldn't for the LIFE OF ME find any information on the

ReportItems! < identifier. AFter much searching i found it buried in a MSDN doc somewhere called "The 5 Elements of a Microsoft Report"

Anyways got it working fine now.

thanks,

mcm

|||

hi

Please tell me how to add Runtime value into Report.rdlc. I have two date(for start & end date) Controls on web page. I want to display those date on Report.rdlc using c#.

thanking you in advance

|||

here is a code fragment that could help you :

List<ReportParameter> par=new List<ReportParameter>();ReportParameter p=newReportParameter("saleid","43660");par.Add(p);this.reportViewer1.ServerReport.SetParameters(par);this.reportViewer1.RefreshReport();
Hope this helps

Saturday, February 25, 2012

.NET 1.1 and .NET 2 Perceives DB data differently

I'm hoping someone can help me out - at least by pointing me to who I can ask, if not answering the question directly.

I have some encrypted values in a SQL Server 2000 database that I unencrypt and use in a website that I just converted from .NET 1.1 to .NET 2.

The data is pulled from the database using standard ADO with no changes between the .NET 1.1 version and the .NET 2 version - yet for some data entries, when the identical value is pulled by the .NET 2 code it is changed or shorted.

For example:

1.1 code traces out a value pulled from the db as:

??淨琳d搈把???媑????????

The same value pulled from the database by .NET 2 looks like this:

??淨琳d搈把媑?????

Do you know why the database value would be interpreted diferently by .NET 2 than by .NET 1.1? How can I bring this in sync so that both 1.1 sites and 2 sites can use the same data?

Now that's a thought. It would explain a shortening.

The column both are pulling from is an nvarchar... and the nvarchar/varchar distinction is not, as far as I know, found in C# strings. So would ADO.NET 2 convert an nvarchar to a varchar while the exact same code in ADO.NET 1.1 does not?

How would I test to see if this is happening?

I think though as a guess that both items are returning nvarchar characters.. while its not visible in what I cut and pasted into this site, there were chinese- and greek-looking characters evident in both versions of the encrypted data which would seem to me like they were both coming out of the database as nvarchar.

|||

Now that's a thought. It would explain a shortening.

The column both are pulling from is an nvarchar... and the nvarchar/varchar distinction is not, as far as I know, found in C# strings. So would ADO.NET 2 convert an nvarchar to a varchar while the exact same code in ADO.NET 1.1 does not?

How would I test to see if this is happening?

I think though as a guess that both items are returning nvarchar characters.. while its not visible in what I cut and pasted into this site, there were chinese- and greek-looking characters evident in both versions of the encrypted data which would seem to me like they were both coming out of the database as nvarchar.

|||oops... I think something just stuttered. :-)|||

I found out the answer... and it is NOT related to ADO.

Why I don't know why the encrypted data appeard differently in .NET 2 when debugged or traced out from the database, I did discover that the .NET 2 encryption has tightened what it will tolerate as acceptable unicode. .NET 1.1 would allow UTF8 encoding... and if it didn't exactly match, it would allow a fudge estimate. .NET 2 does not allow that any more. To get around this, rather than using typical encoding, one needs to make sure that 64 base encoding is used when creating string data from encrypted values.

Information on this can be found here:

http://blogs.msdn.com/shawnfa/archive/2005/11/10/491431.aspx

and here:

http://blogs.msdn.com/shawnste/archive/2005/03/24/401871.aspx

I needed to change my encryption code to use Convert.ToBase64String and Convert.FromBase64String rather than relying on the standard encoding classes. Once I did that, the .NET 2 code could encrypt and decrypt with consistancy with itself, but I could not maintain backwards compatability with the encrypted data already in the database - when it included the .NET 1.1 fudging.

|||

I do not know exactly but it is possible that if encrypt/decrypt on web ASP code it is possible that both version use different key to encrypt/decrypt data, You probably have to make your own key and do encryption/decryption on SQL server side which will always work the same way.

Thanks

|||

Thanks for answering!

Both use the same key to decrypt. But what's interesting here is that the difference is evident before the decryption is run. The raw data from the database looks different (and is shorter) when pulled by ADO .NET 2 from when its pulled by ADO .NET 1.1.

|||

Is it possible that one is returned as varchar and second nvarchar?

Thanks

|||

Now that's a thought. It would explain a shortening.

The column both are pulling from is an nvarchar... and the nvarchar/varchar distinction is not, as far as I know, found in C# strings. So would ADO.NET 2 convert an nvarchar to a varchar while the exact same code in ADO.NET 1.1 does not?

How would I test to see if this is happening?

I think though that both items are returning nvarchar characters.. while its not visible in what I cut and pasted into this site, there were chinese- and greek-looking characters evident in both versions of the encrypted data which would seem to me like they were both coming out of the database as nvarchar.

Sunday, February 19, 2012

... not in ... what is the fastest way ?

Hi,
i have two tables, each has a columnn called "value". Now i want all
"values" from table_1 which does not exist in table_2. I tried:
select table_1.value from table_1 where not exists (select * from table_2
where table_2.value = table_1.value)
Is this the fastest way (in SQL-Server2000)?
thanks,
HelmutHi Helmut,
Yes.
Make sure there is an index on table2.value.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"helmut woess" <hw@.iis.at> wrote in message
news:1tm1fparsdfl.w6pfxn05crxk.dlg@.40tude.net...
> Hi,
> i have two tables, each has a columnn called "value". Now i want all
> "values" from table_1 which does not exist in table_2. I tried:
> select table_1.value from table_1 where not exists (select * from table_2
> where table_2.value = table_1.value)
> Is this the fastest way (in SQL-Server2000)?
> thanks,
> Helmut|||Your query just might be the fastest, but compare in Profiler with this one:
select value
from table_1
left join table_2
on table_2.value = table_1.value
where (table_2.value is null)
ML
http://milambda.blogspot.com/|||Am Tue, 3 Jan 2006 01:34:05 -0800 schrieb ML:

> Your query just might be the fastest, but compare in Profiler with this on
e:
> select value
> from table_1
> left join table_2
> on table_2.value = table_1.value
> where (table_2.value is null)
>
> ML
> --
> http://milambda.blogspot.com/
Thanks, i checked it with the profiler and it seems to be nearly indentical
(i have not so much records now). But your query needs some rows more and
has an additional filter, so if the table has millions of records maybe my
way is faster.
bye,
helmut|||Am Tue, 3 Jan 2006 09:36:12 -0000 schrieb Tony Rogerson:

> Hi Helmut,
> Yes.
> Make sure there is an index on table2.value.
I have an index on it - thanks,
Helmut|||Please, let us know when you test it on millions of rows. We'd like to know.
:)
ML
http://milambda.blogspot.com/

*unsigned* 32-bit column type?

I need to stored lots of unsigned 32-bit values. (I'm actually storing IPv4 addresses). These values will frequently exceed 2^31 but never exceed 2^32

My options are:

Use bigint. This is undesirable since this wastes 32-bits of space for every value.
Use int and use the negative value range to get full 32-bits worth of data. In C, it is easy and fast to cast a signed -1 to an unsigned 2^32-1. In SQL, it will be more expensive: Must cast to 64-bit and if val < 0 then val = 2^32 + val.

Is there a better alternative?

Is there a fast (binary) way to cast a value > 2^31 to a negative signed value?

DECLARE @.value BIGINT
SET @.value = 3000000000

SELECT CONVERT(INT, @.value) -- causes error
SELECT CAST(@.value AS INT) -- causes errorIf it's IP addresses, why don't you break them into parts and store each part in TINYINT? For any sub-mask value you would take only 4 bytes.|||The quick and dirty answer is to do a C union to make both the UINT 32 and INT 32 values easily accessible.

-PatP|||If it's IP addresses, why don't you break them into parts and store each part in TINYINT? For any sub-mask value you would take only 4 bytes.

The quick and dirty answer is to do a C union to make both the UINT 32 and INT 32 values easily accessible.

Thanks guys. I'll stick with the signed 32-bit column and some ugly code to convert between unsigned 32-bit values.

Using 4 columns makes for uglier joins and queries. And Pat, I don't quite follow your approach.

CREATE FUNCTION parseIPv4(@.ipString VARCHAR(30))
RETURNS INT AS
BEGIN
DECLARE @.dotIndex1 INT
SET @.dotIndex1 = CHARINDEX('.', @.ipString)
DECLARE @.dotIndex2 INT
SET @.dotIndex2 = CHARINDEX('.', @.ipString, @.dotIndex1 + 1)
DECLARE @.dotIndex3 INT
SET @.dotIndex3 = CHARINDEX('.', @.ipString, @.dotIndex2 + 1)

IF @.dotIndex3 < 1 RETURN 0

DECLARE @.section1 BIGINT
SET @.section1 = CAST(SUBSTRING(@.ipString, 1, @.dotIndex1 - 1) AS BIGINT)
DECLARE @.section2 BIGINT
SET @.section2 = CAST(SUBSTRING(@.ipString, @.dotIndex1 + 1, @.dotIndex2 - @.dotIndex1 - 1) AS BIGINT)
DECLARE @.section3 BIGINT
SET @.section3 = CAST(SUBSTRING(@.ipString, @.dotIndex2 + 1, @.dotIndex3 - @.dotIndex2 - 1) AS BIGINT)
DECLARE @.section4 BIGINT
SET @.section4 = CAST(RIGHT(@.ipString, LEN(@.ipString) - @.dotIndex3) AS BIGINT)

DECLARE @.result BIGINT
SET @.result = (@.section1 * 0x1000000) | (@.section2 * 0x10000) | (@.section3 * 0x100) | (@.section4)

DECLARE @.t INT

-- If the value can fit in a signed 32-bit value
IF @.result < 2147483648 RETURN @.result

-- The value can't fit in a signed 32-bit value. Use negative space.
-- This is what would happen if the value was binary cast from unsigned to signed.
RETURN CAST(@.result - 4294967296 AS INT)
END|||What I meant was:// ptp 200408021738 demo for dbforums.com

#include <stdio.h>

void main()

{
union bar {
unsigned int u;
int s;
} foo;

foo.u = 4294967293;
printf("%d\n", foo.s); // outputs "-3"
}
-PatP|||What I meant was:

Ah, I see what you are saying. In C you can also just do a binary cast:

unsigned int value = 0xFFFFFFFF;
int signedValue = (int) value; // will be -1

In a T-SQL stored proc, I don't see an equivalent. I'm stuck using if statements and subtraction:

DECLARE @.value BIGINT
DECLARE @.signedValue INT

SET @.value = 4294967295

IF @.value < 2147483648 SET @.signedValue = @.value
ELSE SET @.signedValue = @.value - 4294967296

SELECT @.signedValue -- Will be -1

This works but I had a nagging feeling that there was a cleaner solution... Maybe not.|||Uglier joins and queries? Have you tried it?

begin tran
go
create function fn_RogerWilco(
@.section1 bigint ,
@.section2 bigint ,
@.section3 bigint ,
@.section4 bigint ) returns bigint
as begin
declare @.result bigint
set @.result = (@.section1 * 0x1000000) | (@.section2 * 0x10000) | (@.section3 * 0x100) | (@.section4)
return @.result
end
go
create table RogerWilco (
section1 tinyint not null,
section2 tinyint not null,
section3 tinyint not null,
section4 tinyint not null,
IPAddress as dbo.fn_RogerWilco(section1, section2, section3, section4) )
insert RogerWilco (section1, section2, section3, section4) values (192,168,1,1)
select * from RogerWilco
rollback tran|||In C you can also just do a binary cast:

unsigned int value = 0xFFFFFFFF;
int signedValue = (int) value; // will be -1

I think that you are making this orders of magnitude more difficult than it needs to be. Any flavor of four-byte int reaches the SQL Server as a signed int... It is the only way that they come. If you send any four-byte int down the wire, you'll get back the same bit pattern regardless of how you reference it within your client code. If you use either %d or %u to format it, you'll format the strings as signed or unsigned, regardless of how the int values are declared. The only reason that signed/unsigned makes any difference at all is if you want to do math on the server and have it match math done on the client, if you don't care about that, then nothing else matters!

-PatP|||i prefer the rdjabarov solution myself
i worked on a ip storage question where they had stored it as varchar...(yuck, first timers)
you can however write a pretty complex little function to break apart an ip address using substring and case.
either way i would be very interested to see the storage in a single column with a simple way to use the decimal storage inplace and in the context of an ip address not a decimal.

"The suspense is terrible. I hope it will last." Willy Wonka|||I'm confused. You see value in the database engine being able to address the octets of an IP address? So would a BINARY(4) be what you want, or four separate TINYINT columns, or something different?

I guess I'd never given real thought to allowing the database engine to manipulate the IP addresses directly. I know that it can be done, I'm just not sure that I can see the value in doing it.

-PatP|||I'm confused...I'm just not sure that I can see the value in doing it.Me neither. But maybe he knows something we don't? Do IP addresses actually mean something other than the fact that they belong to class A, B, or C and are unique for their sub-nets? Does converting them to signed/unsigned actually add value?|||Answering the question as given, you could use numeric (11, 0). In the database, it would not look like an IP address as such. Is your application going to decode the data?|||free at last, free at last...thank god almighty...

well you get the idea...

ahem...

anyone want to suggest that an ip address is NOT a number....|||Me neither. But maybe he knows something we don't? Do IP addresses actually mean something other than the fact that they belong to class A, B, or C and are unique for their sub-nets? Does converting them to signed/unsigned actually add value?There are ways you can manipulate IP addresses to obtain useful information if you know the network topology, such as knowing for any address A.B.C.D in your network, its router will be A.B.C.1 or similar operations. You might also know that for a device of class X, there will be a device of class Y at the IP address of X + 2 (for example in a cluster configuration).

I was thinking that RogerWilco wanted to ensure that the addresses computed would match between the client and the server. For that usage, since the server must use signed ints, it would help to be able to have signed ints available on the client too, but that is the only reason I can imagine.

Oh well, maybe RogerWilco will weigh in with some details that my feeble brain can't find at the moment!

-PatP|||anyone want to suggest that an ip address is NOT a number....What else is an IP address but a number? Over the years, folks have put some kind of funky spins on how it is used, but if you go back to Metcalfe's original writings you'll see that it really truly is just a number!

-PatP|||What else is an IP address but a number? Over the years, folks have put some kind of funky spins on how it is used, but if you go back to Metcalfe's original writings you'll see that it really truly is just a number!

-PatP

Do you do math on it?|||How else do you figure out which node is which in a cluster without doing math using the IP address? There might be a way to do it using some really arcane bit mapping dreck, but I'll stick with simple math myself.

-PatP|||What's the formula for it, Pat?|||In our configurations (which aren't standard), node N is the cluster IP + N. Granted that it isn't pretty, but it works.

-PatP|||Well, then why making it so hard when all you need to do is to increment a specific part? Or I missed your answer and it means to add to the signed representation of the IP address?|||Nah, you missed a bunch of stuff riddled throughout this thread. Brett was just freaking because I see an IP address as a UINT32 instead of an abstract data type. He couldn't imagine that I might ever do math on an IP address. Not only do I do simple arithmetic, but I do bitmasks and other fancy tricks too!

-PatP|||For what purpose?

How dynamic does this stuff have to be?|||I still don't see the formula...What do you add N to? UINT of the IP or a specific part of IP?|||If you think of the IP address as a 32 bit unsigned integer, that is what you manipulate. In nearly every case, that means that you'll only manipulate the low order octet. Very few clusters have more than four machines, and they almost never cross a subnet boundary (although in larger "server farms" they certainly could).

-PatP|||OK, I got it. So in regards to what I posted way up there, RogerWilco will have to have a translation back from signed to a 4-part number, huh?|||Most of the C routines that use IP addresses store them as an int or an unsigned int. The bit pattern itself is all that really matters, and ADO does the translation for me.

I suspect that we've made a mountain out of a mole hill. Unless RogerWilco has problems, I think we ought to let this thread die gracefully.

-PatP|||Yes, an IP address is just a number. But:

- There is frequently a need to convert the value in the database to/from the dotted notation that humans are accustomed to. When I do a query, I want to see the IP results in dotted notation format or I want to specify an IP in the WHERE clause in dotted notation. Obviously, a client app can do this kind of thing easily but I frequently need to write one-off SQL statements and run directly in Query Analyzer.
- I'd like to avoid strings since they are an inefficient use of space and are subject to various formatting errors.
- Frequently I want to join two tables together by IP, ORDER BY IP, or GROUP by IP. This is definitely possible but bulkier when the IP value is split across multiple columns: WHERE A.IP1 = B.IP1 AND A.IP2 = B.IP2 AND ...

I really never do anything with the numeric value of an IP other than equality tests. It would be nice to use the numeric value for "range" purposes, as in from 192.168.1.0 to 192.168.1.255 but that doesn't work quite right with signed values.

Thanks for all the answers, everyone! I don't think I've ever gotten this much of a response!

Here are the two TSQL functions I'm using to convert between dotted notation and 32-bit numeric:

CREATE FUNCTION parseIPv4(@.ipString VARCHAR(30))
RETURNS INT AS
BEGIN
DECLARE @.dotIndex1 INT
SET @.dotIndex1 = CHARINDEX('.', @.ipString)
DECLARE @.dotIndex2 INT
SET @.dotIndex2 = CHARINDEX('.', @.ipString, @.dotIndex1 + 1)
DECLARE @.dotIndex3 INT
SET @.dotIndex3 = CHARINDEX('.', @.ipString, @.dotIndex2 + 1)

IF @.dotIndex3 < 1 RETURN 0

DECLARE @.section1 BIGINT
SET @.section1 = CAST(SUBSTRING(@.ipString, 1, @.dotIndex1 - 1) AS BIGINT)
DECLARE @.section2 BIGINT
SET @.section2 = CAST(SUBSTRING(@.ipString, @.dotIndex1 + 1, @.dotIndex2 - @.dotIndex1 - 1) AS BIGINT)
DECLARE @.section3 BIGINT
SET @.section3 = CAST(SUBSTRING(@.ipString, @.dotIndex2 + 1, @.dotIndex3 - @.dotIndex2 - 1) AS BIGINT)
DECLARE @.section4 BIGINT
SET @.section4 = CAST(RIGHT(@.ipString, LEN(@.ipString) - @.dotIndex3) AS BIGINT)

DECLARE @.result BIGINT
SET @.result = (@.section1 * 0x1000000) | (@.section2 * 0x10000) | (@.section3 * 0x100) | (@.section4)

DECLARE @.t INT

IF @.result < 2147483648 RETURN @.result

RETURN CAST(@.result - 4294967296 AS INT)
END

CREATE FUNCTION formatIPv4(@.ipValue INT)
RETURNS VARCHAR(30) AS
BEGIN
DECLARE @.unsignedValue BIGINT
SET @.unsignedValue = @.ipValue
IF @.unsignedValue < 0 SET @.unsignedValue = @.unsignedValue + 4294967296

RETURN
CAST((@.unsignedValue / 0x1000000 & 0xFF) AS VARCHAR(4)) + '.'
+ CAST((@.unsignedValue / 0x0010000 & 0xFF) AS VARCHAR(4)) + '.'
+ CAST((@.unsignedValue / 0x0000100 & 0xFF) AS VARCHAR(4)) + '.'
+ CAST((@.unsignedValue / 0x0000001 & 0xFF) AS VARCHAR(4))
END|||I'd probably fall back to using BINARY(4) then, just because it is more efficient to convert and allows range comparisons. You could use something like:DROP FUNCTION dbo.f_b2s
GO
CREATE FUNCTION dbo.f_b2s(@.ipColumn BINARY(4)) RETURNS VARCHAR(15) AS
BEGIN
RETURN Convert(VARCHAR(3), Ascii(@.ipColumn)) + '.'
+ Convert(VARCHAR(3), Ascii(SubString(@.ipColumn, 2, 1))) + '.'
+ Convert(VARCHAR(3), Ascii(SubString(@.ipColumn, 3, 1))) + '.'
+ Convert(VARCHAR(3), Ascii(SubString(@.ipColumn, 4, 1)))
END
GO
DROP FUNCTION dbo.f_s2b
GO
CREATE FUNCTION dbo.f_s2b(@.pcDotted VARCHAR(20)) RETURNS BINARY(4) AS
BEGIN
DECLARE @.bWork VARBINARY(4)
, @.i1 INT
, @.i2 INT
, @.i3 INT

SET @.i1 = CharIndex('.', @.pcDotted, 1)
SET @.i2 = CharIndex('.', @.pcDotted, 1 + @.i1)
SET @.i3 = CharIndex('.', @.pcDotted, 1 + @.i2)

RETURN
CASE
WHEN @.pcDotted LIKE '%[^.0-9]%' THEN NULL
WHEN @.i3 < @.i2 OR @.i2 < @.i1 OR 0 = @.i1 THEN NULL
ELSE
CAST(Char(Convert(int, SubString(@.pcDotted, 1
, @.i1 - 1))) AS BINARY(1))
+ CAST(Char(Convert(int, SubString(@.pcDotted, @.i1 + 1
, @.i2 - @.i1 - 1))) AS BINARY(1))
+ CAST(Char(Convert(int, SubString(@.pcDotted, @.i2 + 1
, @.i3 - @.i2 - 1))) AS BINARY(1))
+ CAST(Char(Convert(int, SubString(@.pcDotted, @.i3 + 1
, 20))) AS BINARY(1))

END
END
GO-PatP|||free at last, free at last...thank god almighty...

well you get the idea...

ahem...

anyone want to suggest that an ip address is NOT a number....

OK i will byte.
I will suggest that an ip address is not a number..

it is a collection of 4 8bit sections (octets) that make up a network address. so each octet is a "number". because the ip address is not valuable without the subnet mask. 1921681100 as a number means something specific.
192.168.1.100 could be the 192 network or the 192.168 network or the 192.168.1 network etc ...
another problem is that with using numeric (11,0) each octet can contain a decimal equivalent of 1 through 255 so the periods (.) are necessary to decoding the address.

NOW technically if you broke each octet up into it's binary equivalent then each section would be an exact 8 character number consisting of ones and zeros.

rdjabarov,, becuase of cidr and vlsm the old classfull based system of ip addresses is a bit out of date. Classless addressing(Supernetting and subnetting) kind of make the classfull system a bit old fashioned and not the most effective.

My solution in this problem (considering all of the hassles) has always been to have 4 tinyint cols and display accordingly. not the most elegant solution, but it has always been the simplest and i am always one for bringing the app logic to the db

there , i think that about covers it.|||Ah brings tears to a data modelers heart

very nice...

And le the denormalization begin

And, which one are you?

http://www.techwise.com/techwise/index.cfm?ID=F66B888A-1D5D-4FAB-BE0BB5361EDC93BA|||Ah brings tears to a data modelers heart

very nice...

And le the denormalization begin

And, which one are you?

http://www.techwise.com/techwise/index.cfm?ID=F66B888A-1D5D-4FAB-BE0BB5361EDC93BA

front row third from the right.

i'm not in that picture.

as far as normalization goes, they are not rules but guidelines.
i am very dedicated to making my dbs as "normal" as possible but sometimes denormalizing can solve some certain problems but at the same time cause more**.

i realize that breaking up the ip address into 4 individual columns violates the entity rules but dammit it's so much easier than all the other work that has to be performed to treat the ip correctly.

**little known fact is that i invented the 2nd normal form. it was 1965 and i was bored with 1nf (i mean how many tables can you build??) so i tried to spice it up. i thought "Hey lets make more tables, it'l be cool" but shortly after i came out with it [i had ordered all the t shirts and the beer coozies and those arent cheap] codd and date come out with 3nf and steal all of my thunder. i had to eat it on the promotional 2nf pocket protectors and pens i even had my catchy saying and everything

"repeating groups, repeating groups, repeating groups, repeating groups"
catchy huh
"i'll admit it's not as good as the key the whole key and blah blah blah" but dammit those bastards ruined me... :D|||Hey, I'll buy some of your pocket protectors! They'll make great Christmas presents for all of my dba friends and co-workers!

-PatP

*pls help (3 day bug)* If statement not returning TRUE when it should

I've had this bug for days now, please take a look to see if you can help. Thx

I made an html table to store values that VBscript pulls from an Microsoft Access data base. I modified code from w3school to do this. Here's the link: http://www.w3schools.com/ado/ado_display.asp.
All I change are the path, table, and field names. It works fine; It prints out the DB info in a table.

However, when I add a simple if statement (poined out in the code below) to ensure that the only data that gets printed is that which has the same zip code as the zip code that the user entered into the html field, nothing gets printed. The if statement always evaluates FALSE, even though I've checked the 2 sides of the condition statement, and they match up. Here's the code:

<!DOCTYPE asp>
<% Response.Buffer = True %>

<html>
<body>
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "C:\Inetpub\wwwroot\RH25.mdb"
set rs = Server.CreateObject("ADODB.recordset")
sql="SELECT zip, email, skills FROM members"
rs.Open sql, conn
zip = rs("zip")
zw = request.querystring("zipWanted")
response.write "zip= " & zip & " zw= " & zw
%>
<table border="1" width="100%">
<tr>
<%for each x in rs.Fields
response.write("<th>" & x.name & "</th>")
next%>
</tr>
<%do until rs.EOF%>
<tr>
<%for each x in rs.Fields%>
<td>
<%if zip = zw Then <--here's the if statement
Response.Write (x.value)
end if%>
</td>
<%next
rs.MoveNext%>
</tr>
<%loop
rs.close
conn.close
%>
</table></body>
</html>

Thx again.You are setting zip = rs("zip") only for the first record. In your loop to process all the records, you do not reset zip so it still has the same value as it was originally set to. Should be something like this:

<%do until rs.EOF%>
<tr>
<%for each x in rs.Fields
zip = rs("zip")
%>
<td>
<%if zip = zw Then <--here's the if statement
Response.Write (x.value)
end if%>
</td>
<%next
rs.MoveNext%>
</tr>
<%loop

Actually, this isn't a good way to do what you want anyway. If you are only interested in records where zip = zw then you should put that condition in the WHERE clause of your SELECT.|||I try to do what you suggest, but i get this error:

Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression.
/RH25/listings_where.asp, line 20

Where line 20 is: rs.open sql, conn

Here's lines 1-20 of the code i'm using:

<% Option Explicit %>

<% Response.Buffer = True %>

<!-- #include file="adovbs.inc" -->

<html>
<body>
<%
dim zw
dim conn
dim sql
dim rs
zw = CStr(Request.Querystring("zipwanted"))
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "C:\Inetpub\wwwroot\RH25.mdb"
sql="SELECT * FROM members WHERE zip='" & zw & "'"
set rs = Server.CreateObject("ADODB.recordset")
rs.open sql, conn

Thx again|||What is the data type of column members.zip? If it is a number then you don't want the single quotes around the zw value.

Thursday, February 16, 2012

**HAVE NULL AND NOT DUBLICATED VALUES IN COL**

In my opinon the best way of doing this would be through
an 'INSTEAD OF INSERT' trigger.
If you give a bit more on the requirements I can help with
the code, for instance can you have two of...
105,'Tom',null
105,'Tom',null
In the table ?
Peter
"Choose a job you love, and you will never have to work a
day in your life."
Confucius

>--Original Message--
>Hi
>I'm using SQL 2000,how is it possible to control a value
of column to get
>the ollowing result?
>Emp (EmpId PK,EmpName,EmpCode)
>EmpId EmpName EmpCode
>-- -- --
>100 John 3
>101 Anne 5
>102 Robert null
>103 Jennifer null
>104 Peter 78
>I want to have some NULLs or a unique number in EmpCode
column as above,
>I tried to define Uniqe index or constraint but it wasn't
successfull
>because of null,
>now how can I prevent of inserting a record of
(105,'Tom',3) and not prevent
>of inserting a record like (105,'Tom',null)
>Any help would be greatly thankful.
>
>.
>No, we can't have
> 105,'Tom',null
> 105,'Tom',null
cause the first column is a PK,
"Peter The Spate" <anonymous@.discussions.microsoft.com> wrote in message
news:204701c5141e$26f85330$a501280a@.phx.gbl...
> In my opinon the best way of doing this would be through
> an 'INSTEAD OF INSERT' trigger.
> If you give a bit more on the requirements I can help with
> the code, for instance can you have two of...
> 105,'Tom',null
> 105,'Tom',null
> In the table ?
> Peter
> "Choose a job you love, and you will never have to work a
> day in your life."
> Confucius
>
> of column to get
> column as above,
> successfull
> (105,'Tom',3) and not prevent

**HAVE NULL AND NOT DUBLICATED VALUES IN COL**

Hi
I'm using SQL 2000,how is it possible to control a value of column to get
the ollowing result?
Emp (EmpId PK,EmpName,EmpCode)
EmpId EmpName EmpCode
-- -- --
100 John 3
101 Anne 5
102 Robert null
103 Jennifer null
104 Peter 78
I want to have some NULLs or a unique number in EmpCode column as above,
I tried to define Uniqe index or constraint but it wasn't successfull
because of null,
now how can I prevent of inserting a record of (105,'Tom',3) and not prevent
of inserting a record like (105,'Tom',null)
Any help would be greatly thankful.Here are three possible methods (in each case, Colx is the nullable,
unique column):
1. Use an indexed view:
CREATE VIEW SomeTable_Unique_Non_NULL
WITH SCHEMABINDING
AS
SELECT colx
FROM dbo.SomeTable
WHERE colx IS NOT NULL
GO
CREATE UNIQUE CLUSTERED INDEX uclcolx ON SomeTable_Unique_Non_NULL
(colx)
2. Use an index with a calculated column:
CREATE TABLE SomeTable (keycol INTEGER PRIMARY KEY, colx INTEGER NULL,
foo
AS (CASE WHEN colx IS NULL THEN keycol END), UNIQUE (colx,foo))
3. Use a trigger:
CREATE TRIGGER trg_SomeTable_Unique_Non_NULL
ON SomeTable FOR UPDATE, INSERT
AS
IF EXISTS
(SELECT *
FROM Inserted AS I
JOIN SomeTable AS S
ON I.colx = S.colx AND I.keycol<>S.keycol)
BEGIN
ROLLBACK TRAN
RAISERROR('Duplicate values not permitted',16,1)
END
David Portas
SQL Server MVP
--|||David
I think violation of UNIQUE KEY constraint will terminate the batch , i mean
we will not see the error generated by the trigger.
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1108554393.210913.172600@.z14g2000cwz.googlegroups.com...
> Here are three possible methods (in each case, Colx is the nullable,
> unique column):
> 1. Use an indexed view:
> CREATE VIEW SomeTable_Unique_Non_NULL
> WITH SCHEMABINDING
> AS
> SELECT colx
> FROM dbo.SomeTable
> WHERE colx IS NOT NULL
> GO
> CREATE UNIQUE CLUSTERED INDEX uclcolx ON SomeTable_Unique_Non_NULL
> (colx)
> 2. Use an index with a calculated column:
> CREATE TABLE SomeTable (keycol INTEGER PRIMARY KEY, colx INTEGER NULL,
> foo
> AS (CASE WHEN colx IS NULL THEN keycol END), UNIQUE (colx,foo))
> 3. Use a trigger:
> CREATE TRIGGER trg_SomeTable_Unique_Non_NULL
> ON SomeTable FOR UPDATE, INSERT
> AS
> IF EXISTS
> (SELECT *
> FROM Inserted AS I
> JOIN SomeTable AS S
> ON I.colx = S.colx AND I.keycol<>S.keycol)
> BEGIN
> ROLLBACK TRAN
> RAISERROR('Duplicate values not permitted',16,1)
> END
> --
> David Portas
> SQL Server MVP
> --
>|||I tried sth like below in the past ,but I think it can be dangrous in
sometimes
for example if we have a begin transaction in our statement and the this
trigger
fires and duplicated value was inserted then it will rollback to the poit
which made the other activities which are done before this trigger to be
rollbacked too!!!!!!!
what's your openion?
CREATE TRIGGER trg_SomeTable_Unique_Non_NULLred">
> ON SomeTable FOR UPDATE, INSERT
> AS
> IF EXISTS
> (SELECT *
> FROM Inserted AS I
> JOIN SomeTable AS S
> ON I.colx = S.colx AND I.keycol<>S.keycol)
> BEGIN
> ROLLBACK TRAN
> RAISERROR('Duplicate values not permitted',16,1)
> END
>
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1108554393.210913.172600@.z14g2000cwz.googlegroups.com...
> Here are three possible methods (in each case, Colx is the nullable,
> unique column):
> 1. Use an indexed view:
> CREATE VIEW SomeTable_Unique_Non_NULL
> WITH SCHEMABINDING
> AS
> SELECT colx
> FROM dbo.SomeTable
> WHERE colx IS NOT NULL
> GO
> CREATE UNIQUE CLUSTERED INDEX uclcolx ON SomeTable_Unique_Non_NULL
> (colx)
> 2. Use an index with a calculated column:
> CREATE TABLE SomeTable (keycol INTEGER PRIMARY KEY, colx INTEGER NULL,
> foo
> AS (CASE WHEN colx IS NULL THEN keycol END), UNIQUE (colx,foo))
> 3. Use a trigger:
> CREATE TRIGGER trg_SomeTable_Unique_Non_NULL
> ON SomeTable FOR UPDATE, INSERT
> AS
> IF EXISTS
> (SELECT *
> FROM Inserted AS I
> JOIN SomeTable AS S
> ON I.colx = S.colx AND I.keycol<>S.keycol)
> BEGIN
> ROLLBACK TRAN
> RAISERROR('Duplicate values not permitted',16,1)
> END
> --
> David Portas
> SQL Server MVP
> --
>|||On Thu, 17 Feb 2005 08:47:56 +0330, maryam rezvani wrote:

>I tried sth like below in the past ,but I think it can be dangrous in
>sometimes
>for example if we have a begin transaction in our statement and the this
>trigger
>fires and duplicated value was inserted then it will rollback to the poit
>which made the other activities which are done before this trigger to be
>rollbacked too!!!!!!!
>what's your openion?
Hi Maryam,
Transactions are used to encapsulate a number of statements that should
either be executed as a whole, or none at all.
So if I have several statements and one of them is an insert that fails as
a result of duplicate data, I would expect and want SQL Server to undo all
changes made since the BEGIN TRANSACTION.
If you want to rollback only the insert but none of the preceding
activities, then simply commit the transaction for these other activities
first, before executing the insert.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Thanks,now imagine we don't define any begin trans before and we fire this
trigger and it will fail because of duplicated rows and rollback happen
too,but to which poit ?just to prevet inserting duplicated rows or......?
"Hugo Kornelis" <hugo@.pe_NO_rFact.in_SPAM_fo> wrote in message
news:13o811tiqus3gpgt2glj5tn74sp16utraa@.
4ax.com...
> On Thu, 17 Feb 2005 08:47:56 +0330, maryam rezvani wrote:
>
> Hi Maryam,
> Transactions are used to encapsulate a number of statements that should
> either be executed as a whole, or none at all.
> So if I have several statements and one of them is an insert that fails as
> a result of duplicate data, I would expect and want SQL Server to undo all
> changes made since the BEGIN TRANSACTION.
> If you want to rollback only the insert but none of the preceding
> activities, then simply commit the transaction for these other activities
> first, before executing the insert.
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)|||In that case only the INSERT operation itself will be rolled back.
--
David Portas
SQL Server MVP
--|||Yes, if you define colx as UNIQUE then the trigger will not fire. The
trigger is something you can use instead of a unique constraint.
David Portas
SQL Server MVP
--

Saturday, February 11, 2012

(urgent)how should i treat signed decimal values in sql server

Hi,

I want to transfer the data from a excel spread sheet to sql server. I have used the oledb comand and it works fine, and i have also used the sqlbulkcopy and it transfers the data properly.

But in my excel spread sheet i have many columns with data as -0.76 or 0.76 or something like that but when it transfer it to sqlserver that particular column in sql server shows it as 0.00762711864406778

So how i can i tell sql server to display the data as 0.76 instead of 0.00762711864406778

any help will be appreciated.

Regards

Karen

Hi,

The only thing I can think of is the cells in excel with your decimal numbers is formated 1. to display 2 decimal places only, whilst the value is much more precise 2. (that's guess) cell is formated as percentage, so after convesion there is decimal point moved 2 places left ....

Hope at least one of these is true Smile

Tomek

|||

I changed the Format from Percentage to general but it still doesnt work.|||

So you've changed cell formating to general it shows in spreadsheet 0.76 and after transfer you get 0.00762711864406778

What db type has destination column, do you use vb(or any other language) or dts to transfer it?

Try to transfer it to flat file and then see which side cause problem.

Tomek

|||

I am using a oledb connection to connect to the excel spreadsheet and then using a sqlbulkcopy to copy it to sql server. Have changed the dbase field from varchar to money and when it was varchar i get 0.007627118464406778 in the db column and when i changed to money it is been stores as 0.0076

Regards

Karen

|||

This is strange, you changed the cell format from percentage to general and the cells still display 0.76? That seems wrong to me. When you change to general, it should change to .0076 right? So all we are left with as a mystery is why you only see .0076 and if you copy it over to SQL Server you see .0076.....otherstuff, right? Did you change it to "general" or "number"? Number and percentage have a box with "decimal places" in it, that specify how many decimal places to show, but general should show all of them up to the width of the box, the rest are truncated just like any other overflowing field. Is this what is happening? If you go to "number" and increase "decimal places" under formatting options to 10 or 50, does it show some of what SQL Server shows you?

If so, you should consider that Excel is different from SQL Server in that Excel is designed to be both front-end and database at the same time, so it understands the idea of truncating data on display implicitly while separately storing the truth. SQL Server does not implicitly do so, you would need to write a stored procedure or a query that explicitly rounds to see rounded numbers, so you might do 'SELECT round(column, 2.) from table' to get that rounding behavior that you desire. If you want a rounded table, meaning that the data itself is truncated, then you can write a quick t-sql statement to truncate the data in your table but that would affect the accuracy of any further calculations you do from that data.

Hope that helps,

John

|||

John,

Thanks for your answer, I am not doing any calculation for this field, it just gonna displayed in a report. so in the report i will multiply the field by 100 and that should give the right result.

Regards

Karen

(urgent)how should i treat signed decimal values in sql server

Hi,

I want to transfer the data from a excel spread sheet to sql server. I have used the oledb comand and it works fine, and i have also used the sqlbulkcopy and it transfers the data properly.

But in my excel spread sheet i have many columns with data as -0.76 or 0.76 or something like that but when it transfer it to sqlserver that particular column in sql server shows it as 0.00762711864406778

So how i can i tell sql server to display the data as 0.76 instead of 0.00762711864406778

any help will be appreciated.

Regards

Karen

You probably have the columns in excel formatted as a percentage column.

Multiply by 100 and round to the nearest .01

|||

the columns excel are in General, i have tried currency and number and text and they dont work

Regards

Karen

(Target Server Memory)Perf. Monitor Counters

Why does'nt my Target Server Memory value (2.7 GB) within
Memory Manager in the Performance Monitor Counters match
the values in SQL Server Memory Maximum Value (5.2 GB)
My Target Server Memory displays a value of 2.7 GB and the
SQL Memory Maximum displays 5.2 GB.
The boot.ini is set with the following parameters:
[boot loader]
timeout=10
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microso ft
Windows 2000 Advanced Server" /fastdetect /3gb /PAE
The server initially had 6GB of RAM and 2GB were added to
the server. SQL Server displays 5.2 GB is the maximum alot
memory and Dynamically configure SQL Server memory.
How can I fix the memory problem.
Thanks,
Mike
Do you have AWE enabled in SQL?
Are you rinning Enterprise Edition SQL?
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:8ea801c432f6$f47ddf50$a501280a@.phx.gbl...
> Why does'nt my Target Server Memory value (2.7 GB) within
> Memory Manager in the Performance Monitor Counters match
> the values in SQL Server Memory Maximum Value (5.2 GB)
> My Target Server Memory displays a value of 2.7 GB and the
> SQL Memory Maximum displays 5.2 GB.
> The boot.ini is set with the following parameters:
> [boot loader]
> timeout=10
> default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
> [operating systems]
> multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microso ft
> Windows 2000 Advanced Server" /fastdetect /3gb /PAE
> The server initially had 6GB of RAM and 2GB were added to
> the server. SQL Server displays 5.2 GB is the maximum alot
> memory and Dynamically configure SQL Server memory.
> How can I fix the memory problem.
> Thanks,
> Mike
>

(Target Server Memory)Perf. Monitor Counters

Why does'nt my Target Server Memory value (2.7 GB) within
Memory Manager in the Performance Monitor Counters match
the values in SQL Server Memory Maximum Value (5.2 GB)
My Target Server Memory displays a value of 2.7 GB and the
SQL Memory Maximum displays 5.2 GB.
The boot.ini is set with the following parameters:
[boot loader]
timeout=10
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft
Windows 2000 Advanced Server" /fastdetect /3gb /PAE
The server initially had 6GB of RAM and 2GB were added to
the server. SQL Server displays 5.2 GB is the maximum alot
memory and Dynamically configure SQL Server memory.
How can I fix the memory problem.
Thanks,
MikeDo you have AWE enabled in SQL?
Are you rinning Enterprise Edition SQL?
--
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:8ea801c432f6$f47ddf50$a501280a@.phx.gbl...
> Why does'nt my Target Server Memory value (2.7 GB) within
> Memory Manager in the Performance Monitor Counters match
> the values in SQL Server Memory Maximum Value (5.2 GB)
> My Target Server Memory displays a value of 2.7 GB and the
> SQL Memory Maximum displays 5.2 GB.
> The boot.ini is set with the following parameters:
> [boot loader]
> timeout=10
> default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
> [operating systems]
> multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft
> Windows 2000 Advanced Server" /fastdetect /3gb /PAE
> The server initially had 6GB of RAM and 2GB were added to
> the server. SQL Server displays 5.2 GB is the maximum alot
> memory and Dynamically configure SQL Server memory.
> How can I fix the memory problem.
> Thanks,
> Mike
>

(Target Server Memory)Perf. Monitor Counters

Why does'nt my Target Server Memory value (2.7 GB) within
Memory Manager in the Performance Monitor Counters match
the values in SQL Server Memory Maximum Value (5.2 GB)
My Target Server Memory displays a value of 2.7 GB and the
SQL Memory Maximum displays 5.2 GB.
The boot.ini is set with the following parameters:
[boot loader]
timeout=10
default=multi(0)disk(0)rdisk(0)partition
(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINN
T="Microsoft
Windows 2000 Advanced Server" /fastdetect /3gb /PAE
The server initially had 6GB of RAM and 2GB were added to
the server. SQL Server displays 5.2 GB is the maximum alot
memory and Dynamically configure SQL Server memory.
How can I fix the memory problem.
Thanks,
MikeDo you have AWE enabled in SQL?
Are you rinning Enterprise Edition SQL?
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:8ea801c432f6$f47ddf50$a501280a@.phx.gbl...
> Why does'nt my Target Server Memory value (2.7 GB) within
> Memory Manager in the Performance Monitor Counters match
> the values in SQL Server Memory Maximum Value (5.2 GB)
> My Target Server Memory displays a value of 2.7 GB and the
> SQL Memory Maximum displays 5.2 GB.
> The boot.ini is set with the following parameters:
> [boot loader]
> timeout=10
> default=multi(0)disk(0)rdisk(0)partition
(1)\WINNT
> [operating systems]
> multi(0)disk(0)rdisk(0)partition(1)\WINN
T="Microsoft
> Windows 2000 Advanced Server" /fastdetect /3gb /PAE
> The server initially had 6GB of RAM and 2GB were added to
> the server. SQL Server displays 5.2 GB is the maximum alot
> memory and Dynamically configure SQL Server memory.
> How can I fix the memory problem.
> Thanks,
> Mike
>