Showing posts with label order. Show all posts
Showing posts with label order. Show all posts

Monday, March 19, 2012

Choosing the correct data types

In a typical "Order Item" table I need to store the selling price of
the item and the percentage discount applied. I'm thinking Numeric
for the price, and Float for the percentage.
Good design, or clueless?
Thanks
Edward
I would tend to opt for Numeric/Decimal for percentage as well. Why
introduce approximate numbers? Do you even need decimal places here?
(Typically discounts are 10%, 20% etc.)
<teddysnips@.hotmail.com> wrote in message
news:e4aa5937-58af-4be0-8db0-2b582c8fd7e3@.s36g2000prg.googlegroups.com...
> In a typical "Order Item" table I need to store the selling price of
> the item and the percentage discount applied. I'm thinking Numeric
> for the price, and Float for the percentage.
> Good design, or clueless?
> Thanks
> Edward
|||those will work. You could also consider using the money datatype for the
price.
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
<teddysnips@.hotmail.com> wrote in message
news:e4aa5937-58af-4be0-8db0-2b582c8fd7e3@.s36g2000prg.googlegroups.com...
> In a typical "Order Item" table I need to store the selling price of
> the item and the percentage discount applied. I'm thinking Numeric
> for the price, and Float for the percentage.
> Good design, or clueless?
> Thanks
> Edward

Choosing the correct data types

In a typical "Order Item" table I need to store the selling price of
the item and the percentage discount applied. I'm thinking Numeric
for the price, and Float for the percentage.
Good design, or clueless?
Thanks
EdwardI would tend to opt for Numeric/Decimal for percentage as well. Why
introduce approximate numbers? Do you even need decimal places here?
(Typically discounts are 10%, 20% etc.)
<teddysnips@.hotmail.com> wrote in message
news:e4aa5937-58af-4be0-8db0-2b582c8fd7e3@.s36g2000prg.googlegroups.com...
> In a typical "Order Item" table I need to store the selling price of
> the item and the percentage discount applied. I'm thinking Numeric
> for the price, and Float for the percentage.
> Good design, or clueless?
> Thanks
> Edward|||those will work. You could also consider using the money datatype for the
price.
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
<teddysnips@.hotmail.com> wrote in message
news:e4aa5937-58af-4be0-8db0-2b582c8fd7e3@.s36g2000prg.googlegroups.com...
> In a typical "Order Item" table I need to store the selling price of
> the item and the percentage discount applied. I'm thinking Numeric
> for the price, and Float for the percentage.
> Good design, or clueless?
> Thanks
> Edward

Choosing the correct data types

In a typical "Order Item" table I need to store the selling price of
the item and the percentage discount applied. I'm thinking Numeric
for the price, and Float for the percentage.
Good design, or clueless?
Thanks
EdwardI would tend to opt for Numeric/Decimal for percentage as well. Why
introduce approximate numbers? Do you even need decimal places here?
(Typically discounts are 10%, 20% etc.)
<teddysnips@.hotmail.com> wrote in message
news:e4aa5937-58af-4be0-8db0-2b582c8fd7e3@.s36g2000prg.googlegroups.com...
> In a typical "Order Item" table I need to store the selling price of
> the item and the percentage discount applied. I'm thinking Numeric
> for the price, and Float for the percentage.
> Good design, or clueless?
> Thanks
> Edward|||those will work. You could also consider using the money datatype for the
price.
--
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
<teddysnips@.hotmail.com> wrote in message
news:e4aa5937-58af-4be0-8db0-2b582c8fd7e3@.s36g2000prg.googlegroups.com...
> In a typical "Order Item" table I need to store the selling price of
> the item and the percentage discount applied. I'm thinking Numeric
> for the price, and Float for the percentage.
> Good design, or clueless?
> Thanks
> Edward

Thursday, March 8, 2012

Chinese Characters

How do I have to setup my SQL Server in order to be able to introduce (save) Chinese Characters additionally?

If you look at the SQL Server Books On Line it gives you some advice on different collations. Here is a point to one section of the online help.

http://msdn2.microsoft.com/en-us/library/ms143508.aspx

Michelle

Chinese Characters

How do I have to setup my SQL Server in order to be able to introduce (save) Chinese Characters additionally?

If you look at the SQL Server Books On Line it gives you some advice on different collations. Here is a point to one section of the online help.

http://msdn2.microsoft.com/en-us/library/ms143508.aspx

Michelle

Saturday, February 25, 2012

checklist

Just got a new server and I was wondering if there is a checklist available
somewhere in order to transfer all databases, jobs, users, and replication
information to my server?
Thanks
HOW TO: Move Databases Between Computers That Are Running
SQL Server
http://support.microsoft.com/?id=314546
-Sue
On Mon, 28 Mar 2005 17:33:04 -0800, Anonymous
<Anonymous@.discussions.microsoft.com> wrote:

>Just got a new server and I was wondering if there is a checklist available
>somewhere in order to transfer all databases, jobs, users, and replication
>information to my server?
>Thanks
|||Have a look here: http://vyaskn.tripod.com/moving_sql_server.htm
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Anonymous" <Anonymous@.discussions.microsoft.com> wrote in message
news:1C271C97-16DA-4B01-9044-B0DE5874A397@.microsoft.com...
Just got a new server and I was wondering if there is a checklist available
somewhere in order to transfer all databases, jobs, users, and replication
information to my server?
Thanks

checklist

Just got a new server and I was wondering if there is a checklist available
somewhere in order to transfer all databases, jobs, users, and replication
information to my server?
ThanksHOW TO: Move Databases Between Computers That Are Running
SQL Server
http://support.microsoft.com/?id=314546
-Sue
On Mon, 28 Mar 2005 17:33:04 -0800, Anonymous
<Anonymous@.discussions.microsoft.com> wrote:

>Just got a new server and I was wondering if there is a checklist available
>somewhere in order to transfer all databases, jobs, users, and replication
>information to my server?
>Thanks|||Have a look here: http://vyaskn.tripod.com/moving_sql_server.htm
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Anonymous" <Anonymous@.discussions.microsoft.com> wrote in message
news:1C271C97-16DA-4B01-9044-B0DE5874A397@.microsoft.com...
Just got a new server and I was wondering if there is a checklist available
somewhere in order to transfer all databases, jobs, users, and replication
information to my server?
Thanks

checklist

Just got a new server and I was wondering if there is a checklist available
somewhere in order to transfer all databases, jobs, users, and replication
information to my server?
ThanksHOW TO: Move Databases Between Computers That Are Running
SQL Server
http://support.microsoft.com/?id=314546
-Sue
On Mon, 28 Mar 2005 17:33:04 -0800, Anonymous
<Anonymous@.discussions.microsoft.com> wrote:
>Just got a new server and I was wondering if there is a checklist available
>somewhere in order to transfer all databases, jobs, users, and replication
>information to my server?
>Thanks|||Have a look here: http://vyaskn.tripod.com/moving_sql_server.htm
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Anonymous" <Anonymous@.discussions.microsoft.com> wrote in message
news:1C271C97-16DA-4B01-9044-B0DE5874A397@.microsoft.com...
Just got a new server and I was wondering if there is a checklist available
somewhere in order to transfer all databases, jobs, users, and replication
information to my server?
Thanks

Friday, February 24, 2012

Checking the state of a variable as first step of package?

Am I correct in thinking that I need to place a dummy script component which does nothing in order to route logic depending on the value of a variable?

ie. I want to output to a file if a Parent variable is a certain value, or i want to load a table if its a different value.

Unfortunately, yes.

checking success of a request in a stored procedure

Hi,
Say I have a stored procedure which does two INSERT operation.
How can I check if the first INSERT succeeded in order to know if I
should carry on and do the second one ?

RegardsYou can check @.@.ERROR to see if an error was raised, or @.@.ROWCOUNT to
see how many rows were inserted - in some cases you might consider it
an error if no rows were inserted.

See here for much more information:

http://www.sommarskog.se/error-handling-II.html

Simon