Showing posts with label specific. Show all posts
Showing posts with label specific. Show all posts

Sunday, March 11, 2012

"Storing an image into Sql Server Database "

Is there any way of storing an image file into a specific Table .
It would be of great help for me if i come to know something about it.One simple way is to store the physical path of the image

Madhivanan|||(santosh_stb@.indiatimes.com) writes:
> Is there any way of storing an image file into a specific Table .
> It would be of great help for me if i come to know something about it.

You can use the image datatype. You can also opt to store the image
in the file system and store only the path in the database as
Madhivanan suggested. This latter is simpler to implement, in the
short-term at least, but is less reliable since you have poorer
transaction scope, the file can more easily disappear.

Thus using image is more robust, but admittedly it takes more code to
come there.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

"Simple" query help

Hello!
I would like some help to figure out how to write a specific update query.
What I'm trying to do:
I have one table with these columns:
no (primary key or clustered?)
object (primary key or clustered?)
cid
usergroup1
usergroup2
Lets say the table I would like to upgrade is called obj1 and the table I'm
getting the value to set from is called obj2.
This is in real the same table and it's called objectx.
I would like to set cid for the records with no=7 in obj1 to the value of
the records in obj2 with:
obj2.no=1,
obj2.usergroup2=obj1.object
the value should be set to obj2.usergroup1
The obj2.usergroup2 values could be found several times.
Any idea how to write this query?
Regards MagnusOn Fri, 9 Dec 2005 12:16:41 +0100, Magnus Blomberg wrote:

>Hello!
>I would like some help to figure out how to write a specific update query.
>What I'm trying to do:
>I have one table with these columns:
>no (primary key or clustered?)
>object (primary key or clustered?)
>cid
>usergroup1
>usergroup2
>Lets say the table I would like to upgrade is called obj1 and the table I'm
>getting the value to set from is called obj2.
>This is in real the same table and it's called objectx.
>I would like to set cid for the records with no=7 in obj1 to the value of
>the records in obj2 with:
>obj2.no=1,
>obj2.usergroup2=obj1.object
>the value should be set to obj2.usergroup1
>The obj2.usergroup2 values could be found several times.
>Any idea how to write this query?
>Regards Magnus
>
Hi Magnus,
Before writing the query, the specifications should be clear. You say
that obj2.usergroup2 can be found several times. That means that there
might be more than one obj2.usergroup1. Which one of these should be
used to set obj1.cid'
If you need the lowest value, try if this works:
UPDATE objectx
SET cid = (SELECT MIN(obj2.usergroup1)
FROM objectx AS obj2
WHERE obj2.no = 1
AND obj2.usergroup2 = objectx.object)
WHERE no = 7
(untested - if you prefer a tested reply or if this doesn;t work, then
please check www.aspfaq.com/5006 to find out how to provide clear specs
and test data).
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)

Friday, February 24, 2012

"Large" Table

What would most people consider to be a "large" table for a SQL server
database? I'm not asking for any specific purpose, most just a
"consider this" sort of thing...
Thanks,
Frank V.well . table with >100.000 rows is considered a pretty large table :)
cheers.|||I would classify any table that is difficult to manage due to its size as
"large". I would draw the line at 10's of millions of rows but that's
purely subjective. Much depends on the hardware.
Hope this helps.
Dan Guzman
SQL Server MVP
"Frank V" <jawzx01@.gmail.com> wrote in message
news:1184784737.154468.26810@.z28g2000prd.googlegroups.com...
> What would most people consider to be a "large" table for a SQL server
> database? I'm not asking for any specific purpose, most just a
> "consider this" sort of thing...
> Thanks,
> Frank V.
>|||A VERY subjective question. How wide are these rows and what hardware do
they sit on and what is the database and even table physical layout all play
major roles in determining whether a table is "large" or not.
--
TheSQLGuru
President
Indicium Resources, Inc.
"Frank V" <jawzx01@.gmail.com> wrote in message
news:1184784737.154468.26810@.z28g2000prd.googlegroups.com...
> What would most people consider to be a "large" table for a SQL server
> database? I'm not asking for any specific purpose, most just a
> "consider this" sort of thing...
> Thanks,
> Frank V.
>|||> What would most people consider to be a "large" table for a SQL server
> database? I'm not asking for any specific purpose, most just a
> "consider this" sort of thing...
The table with the largest number of rows I have has 3 millions rows. It
doesn't make any significant difference in performance with any other table,
except for badly designed queries ending in a sequential scan of a large
number of records. My queries have been carefully designed and the required
indexes have been created. That's why the number of records is not that much
significant.
btw: The database run on a desktop class server.
--
Francois PIETTE
http://www.overbyte.be|||On 18 Jul, 19:52, Frank V <jawz...@.gmail.com> wrote:
> What would most people consider to be a "large" table for a SQL server
> database? I'm not asking for any specific purpose, most just a
> "consider this" sort of thing...
> Thanks,
> Frank V.
A terabyte is quite large. Less than 1 million rows is not large. 6
feet is small and a mile is too long.
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||I also think this is quite subjective. IMO a table is big if it exceeds
the server's RAM. So for a table with 4 GB RAM, I would consider a table
bigger than 4 GB large. Most 100,000 row tables would not qualify as
large using this criterium.
Gert-Jan
Hate_orphaned_users wrote:
> well . table with >100.000 rows is considered a pretty large table :)
> cheers.|||On Jul 19, 12:52 am, Frank V <jawz...@.gmail.com> wrote:
> What would most people consider to be a "large" table for a SQL server
> database? I'm not asking for any specific purpose, most just a
> "consider this" sort of thing...
> Thanks,
> Frank V.
Any table with ~5 mil rows is fairly large in my opinion. HTH.

"Large" Table

What would most people consider to be a "large" table for a SQL server
database? I'm not asking for any specific purpose, most just a
"consider this" sort of thing...
Thanks,
Frank V.
well . table with >100.000 rows is considered a pretty large table
cheers.
|||I would classify any table that is difficult to manage due to its size as
"large". I would draw the line at 10's of millions of rows but that's
purely subjective. Much depends on the hardware.
Hope this helps.
Dan Guzman
SQL Server MVP
"Frank V" <jawzx01@.gmail.com> wrote in message
news:1184784737.154468.26810@.z28g2000prd.googlegro ups.com...
> What would most people consider to be a "large" table for a SQL server
> database? I'm not asking for any specific purpose, most just a
> "consider this" sort of thing...
> Thanks,
> Frank V.
>
|||A VERY subjective question. How wide are these rows and what hardware do
they sit on and what is the database and even table physical layout all play
major roles in determining whether a table is "large" or not.
TheSQLGuru
President
Indicium Resources, Inc.
"Frank V" <jawzx01@.gmail.com> wrote in message
news:1184784737.154468.26810@.z28g2000prd.googlegro ups.com...
> What would most people consider to be a "large" table for a SQL server
> database? I'm not asking for any specific purpose, most just a
> "consider this" sort of thing...
> Thanks,
> Frank V.
>
|||> What would most people consider to be a "large" table for a SQL server
> database? I'm not asking for any specific purpose, most just a
> "consider this" sort of thing...
The table with the largest number of rows I have has 3 millions rows. It
doesn't make any significant difference in performance with any other table,
except for badly designed queries ending in a sequential scan of a large
number of records. My queries have been carefully designed and the required
indexes have been created. That's why the number of records is not that much
significant.
btw: The database run on a desktop class server.
Francois PIETTE
http://www.overbyte.be
|||On 18 Jul, 19:52, Frank V <jawz...@.gmail.com> wrote:
> What would most people consider to be a "large" table for a SQL server
> database? I'm not asking for any specific purpose, most just a
> "consider this" sort of thing...
> Thanks,
> Frank V.
A terabyte is quite large. Less than 1 million rows is not large. 6
feet is small and a mile is too long.
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
|||I also think this is quite subjective. IMO a table is big if it exceeds
the server's RAM. So for a table with 4 GB RAM, I would consider a table
bigger than 4 GB large. Most 100,000 row tables would not qualify as
large using this criterium.
Gert-Jan
Hate_orphaned_users wrote:
> well . table with >100.000 rows is considered a pretty large table
> cheers.
|||On Jul 19, 12:52 am, Frank V <jawz...@.gmail.com> wrote:
> What would most people consider to be a "large" table for a SQL server
> database? I'm not asking for any specific purpose, most just a
> "consider this" sort of thing...
> Thanks,
> Frank V.
Any table with ~5 mil rows is fairly large in my opinion. HTH.

"Large" Table

What would most people consider to be a "large" table for a SQL server
database? I'm not asking for any specific purpose, most just a
"consider this" sort of thing...
Thanks,
Frank V.well . table with >100.000 rows is considered a pretty large table
cheers.|||I would classify any table that is difficult to manage due to its size as
"large". I would draw the line at 10's of millions of rows but that's
purely subjective. Much depends on the hardware.
Hope this helps.
Dan Guzman
SQL Server MVP
"Frank V" <jawzx01@.gmail.com> wrote in message
news:1184784737.154468.26810@.z28g2000prd.googlegroups.com...
> What would most people consider to be a "large" table for a SQL server
> database? I'm not asking for any specific purpose, most just a
> "consider this" sort of thing...
> Thanks,
> Frank V.
>|||A VERY subjective question. How wide are these rows and what hardware do
they sit on and what is the database and even table physical layout all play
major roles in determining whether a table is "large" or not.
TheSQLGuru
President
Indicium Resources, Inc.
"Frank V" <jawzx01@.gmail.com> wrote in message
news:1184784737.154468.26810@.z28g2000prd.googlegroups.com...
> What would most people consider to be a "large" table for a SQL server
> database? I'm not asking for any specific purpose, most just a
> "consider this" sort of thing...
> Thanks,
> Frank V.
>|||> What would most people consider to be a "large" table for a SQL server
> database? I'm not asking for any specific purpose, most just a
> "consider this" sort of thing...
The table with the largest number of rows I have has 3 millions rows. It
doesn't make any significant difference in performance with any other table,
except for badly designed queries ending in a sequential scan of a large
number of records. My queries have been carefully designed and the required
indexes have been created. That's why the number of records is not that much
significant.
btw: The database run on a desktop class server.
Francois PIETTE
http://www.overbyte.be|||On 18 Jul, 19:52, Frank V <jawz...@.gmail.com> wrote:
> What would most people consider to be a "large" table for a SQL server
> database? I'm not asking for any specific purpose, most just a
> "consider this" sort of thing...
> Thanks,
> Frank V.
A terabyte is quite large. Less than 1 million rows is not large. 6
feet is small and a mile is too long.
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||I also think this is quite subjective. IMO a table is big if it exceeds
the server's RAM. So for a table with 4 GB RAM, I would consider a table
bigger than 4 GB large. Most 100,000 row tables would not qualify as
large using this criterium.
Gert-Jan
Hate_orphaned_users wrote:
> well . table with >100.000 rows is considered a pretty large table
> cheers.|||On Jul 19, 12:52 am, Frank V <jawz...@.gmail.com> wrote:
> What would most people consider to be a "large" table for a SQL server
> database? I'm not asking for any specific purpose, most just a
> "consider this" sort of thing...
> Thanks,
> Frank V.
Any table with ~5 mil rows is fairly large in my opinion. HTH.