all groups > sql server programming > august 2007 > threads for tuesday august 28
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
sql server and blob
Posted by Jure Bogataj at 8/28/2007 11:21:17 PM
Hi!
Don't know if its the right NG. I was wondering if it would be wise to store
arround 15 million files to database as BLOB data (from 25KB to 10MB) with
other metadata for those files? What does this mean? What should I consider
when doing this (performance, security, backup, restore, db... more >>
Stored Procedures in C#, instead of processing updates on client
Posted by morleyc NO[at]SPAM gmail.com at 8/28/2007 8:17:50 PM
Hi, i am beginning SQL server programming and when reading a book on
the subject (very briefly, flicking through the book i saw a small
chapter and mention) i saw what looked like the ability to have C#
functions on the server as stored procedures, from memory it was
called CLR i belive?
What... more >>
Select Distinct Query Which Reads Only First Three Characters
Posted by weez at 8/28/2007 5:54:56 PM
Hey People,
I'm still fairly new to SQL, so hopefully I explain myself well.
I need to summarise the 2008 enrolment status of all the students.
However, due to the schoool being multi campus and the fact that they
only record the class group for the next year and not acaedmic year
level, it... more >>
Data Retention
Posted by Daniel at 8/28/2007 5:21:57 PM
Have a question about some good practices on keeping 7 to 10 years of data
within SQL2005?
We have an in-house application we have built to handle our hiring and
terminating of employees. We have imported all data from previous system,
which is no longer in use or available...
What are s... more >>
Ping Entries in Table and Update
Posted by Ray at 8/28/2007 5:18:19 PM
I have a table listing machines, ip addresses, and ping status
How can I create a DTS package that will ping each of the entries in
the table and update that status field?
Thanks... more >>
Batch errors, transactions, and @@error
Posted by David W at 8/28/2007 4:11:54 PM
I have been reading lots of articles on this, but still have yet to find a
relatively simple solution.
Take 2 sprocs that occur within a transaction, one calls the other. How do
you deal with a batch abort without getting the error:
Transaction count after EXECUTE indicates that a COMMIT ... more >>
Tracking changes over time (repost)
Posted by <-> at 8/28/2007 3:52:16 PM
I want to repost this because my last post got off track. My error: I
omitted a detail and the conversation got a bit out of hand. Also, here's a
different approach to my problem.
My goal is to have a time-based set of data. Over time, there will be
changes, although they won't occur often. ... more >>
increase accuracy of SQL function calcs
Posted by Ed White at 8/28/2007 3:30:03 PM
I'm doing various calculations using SQL's built-in functions, including VARP
and STDEV. SQL seems at times to be returning these calcs with only 3
decimals of precision, and I need more. Is there an option somewhere in SQL
Server to increase this precision--if so, how do I change it?
--
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Union Exception!!!
Posted by Vai2000 at 8/28/2007 2:48:01 PM
Hi All, I have a query
Select * from TableA where ID=5
Union
select * from TableB Where CustomerLastName='ALFKI'
Running into this error:
===========================
Error:
All queries combined using a UNION, INTERSECT or EXCEPT operator must have
an equal number of expressions in their ... more >>
Calling SQL jobs from another job
Posted by A.G. at 8/28/2007 2:04:27 PM
Hi,
I am searching if it's feasible to call SQL jobs from another job ?
Sample :
Job1 : backup job
Job2 : Restore job
Job3 : call Job1
If success, call Job2
Thks for your help.
Alain.... more >>
SP with argument passed used in IN clause
Posted by Darin at 8/28/2007 2:00:51 PM
I want to create a stored procedure like:
create procedure dbo.test
(
@in_type char (10)
)
AS
INSERT INTO TESTTABLE (amount)
SELECT chst_amount
FROM ARHistory
WHERE chst_type IN (@in_type)
Is this possible? I couldn't seem to get it to work. If not, what
options do I have?
Darin
... more >>
Weekly Report Update
Posted by Ryan at 8/28/2007 1:15:45 PM
My database stores a list of employees. Each employee has a hire_date
field. Once a Week, I would like to send out a report to backend-users (who
choose to receive it) with a list of new employees over the next week.
Looking for advice to see if I'm going about this the right way of if there... more >>
Create a table with SMO
Posted by Lubomir at 8/28/2007 1:04:10 PM
Hi,
I want to create a new table in existing database programmatically with SMO.
When I call Table.Create() method I get an excpetion "Create failed for
table..." and an inner exception "Set property Text to acomplish this action."
Neither Table, nor Column has a property Text. So what co... more >>
Getting list of drives from SQL server
Posted by ted185 at 8/28/2007 12:54:01 PM
I am using smo and can not find any way of getting a list of the drives on
the sql server. You can see the drives in sql management studio and select
a drive and folder to restore databases to.
Is there a way to access the drive and folder list from sql management
studio? Is this a com... more >>
issue related index dropped
Posted by Iter at 8/28/2007 12:44:04 PM
In my company, we have index on the table, which is dropped first, then
update this table, and then created that index again. Today, we got an error
that index is existed and cannot created again. It is weird that why it was
happened. I am wondering if the index was not dropped due to some rea... more >>
T-SQL "WHERE" or "AND"
Posted by Peter L. at 8/28/2007 12:38:08 PM
In SQL Server 2000; in the statement below:
SELECT
A.SizeID
FROM Apples A
LEFT JOIN Oranges B ON (A.ColorID = B.ColorID)
WHERE
A.SizeID = 2
what happens when I change the "WHERE" to an "AND"?
The execution plan changes, why?
--
-Peter... more >>
Not EAV, but AV, is that less evil?
Posted by <-> at 8/28/2007 12:06:26 PM
I am reading google and trying to get a handle on EAV versus other temporal
approaches.
From what I gather so far, EAV is basically considered bad for a bunch of
reasons. However, even though I see a lot of resistance to EAV, I see few
alternatives.
My needs are to create a temporal cont... more >>
TSQL Select Statement
Posted by brandon at 8/28/2007 12:02:05 PM
I have the table Events with EventId, EventTitle. I have another table
Registration with EventId. Also Customer which has EventId.
I want to get all the Events then the count from Registration as well
Customer where the EventId is same as in Events otherwise count as 0:
EventId EventTitle ... more >>
Debugging Stored Procedures (Dynamic SQL), SQL-Server 2000
Posted by fuka at 8/28/2007 11:40:02 AM
Hi,
I have written some Stored Procedurs using dynamic SQL. To find out
mistakes it would be helpful to get the SQL-String, which is executed.
Using "Print sql" I only get the beginning part of the SQL-String. I
also tried something like this Set @sql1 =3D Left(@sql, 40), Set @sql2 =3D
substr... more >>
Comparing Accents - not being recognized...
Posted by Greg Toronto at 8/28/2007 10:26:00 AM
I have a table of names, some of which have accents. (Éric, for example).
I have another table of names, which has no accents. (Eric, for example).
When I try to join the two together, Éric and Eric don't match up.
I assumed it was the collation, so I changed my DB properties to
SQL_L... more >>
Boolean Datatype
Posted by ZZ_Scarab at 8/28/2007 9:45:35 AM
Hi,
I need to create a table with a number of boolean (True/False) fields but
SQL Server is not accepting tha Boolean keyword. I realize that this is not
a native type, but I though it was implemented as part of the SQL 1999
standard compliance (as a derived data tpye from the bit data type... more >>
Creating tables on the fly
Posted by michael sorens at 8/28/2007 9:40:01 AM
With "SELECT INTO" one can dynamically create a table based on the selected
elements. I have two questions on this topic:
(1) If I execute a SELECT INTO with a string constant as one of the selected
fields (e.g. SELECT 'xyz' as ItemName, count(*) as Count INTO #Temp1 from
TableABC) it seem... more >>
irrelevant question
Posted by rodchar at 8/28/2007 6:46:01 AM
hey all,
could you include a Tab key when you format the PRINT statement in sql
management studio query?
thanks,
rodchar... more >>
Database Design problem - what's best to handle this?
Posted by mark4asp at 8/28/2007 4:12:05 AM
What's the best way to handle this problem?
News reports are written. Each report references a Consultant. Both
the ConsultantID (unique identifier) and the ConsultantName are
currently stored with the report (I changed this recently by adding
the ConsultantID, previously only the ConsultantNa... more >>
sp_executesql --- can't get this working
Posted by Sammy at 8/28/2007 4:00:03 AM
declare @SQL NVARCHAR(2000)
DECLARE @Parms NVARCHAR(500)
declare @tabparam sysname
SET @SQL = N'DBCC SHOWCONTIG ('''+ @table +''') WITH FAST,
TABLERESULTS,NO_INFOMSGS'
SET @Parms = N'@table sysname'
SET @tabparam = N'Custs'
EXECUTE sp_executesql @SQL,@Parms, @table =@tabparam
D... more >>
Avoiding multiple recordsets from StoredProc
Posted by Kjell Brandes at 8/28/2007 3:52:01 AM
I have a SP that has several SELECTS in it, it seems as if these SELECTs are
returned as several recordsets when using OLEDB as connectionmethod from ASP.
I have used ODBC without the need of declaring what recordset to use before,
but now I'm getting problems. Is there any way to tell the PRO... more >>
How we can Export a table data into a XMLFile
Posted by Rahul at 8/28/2007 3:30:10 AM
Friends,
How we can Export a table data into a XMLFile?
Rahul
... more >>
Use Ntext datatype as Parameter in sp
Posted by Rahul at 8/28/2007 1:48:41 AM
Friends,
I have a table
Create Table Test
(
ID Int,
XMLString NText
)
I am not able to pass xmlstring into following sp.
Declare @lstr Ntext
Select @lStr = XMLString
>From Test
Where ID = 1
EXECUTE sp_xml_preparedocument @lDoc OUTPUT, @lStr
As because Test.XMLString is NText d... more >>
Problem with Linked Servers
Posted by jerome at 8/28/2007 12:00:00 AM
Hi,
I am working with SQL SERVER 2000
I have a linked server called in a SP.
Sometimes this linked server is not available on the network.
And, obviously, I get an error message.
Is it possible to test if this linked server is available befor using the SP
?
I tried to use @@error but ... more >>
Using Clustered Indexes
Posted by Roy Goldhammer at 8/28/2007 12:00:00 AM
Hello there
Today i stuck with new thing: I have huge database: approx 50Gb with almost
500 tables.
Many of the tables didn't had primary keys without clustered indexes.
After i add clustered indexes to group of tables and run store procedures
that use this tables the performance becume... more >>
Cumulative tax rates
Posted by John Winterbottom at 8/28/2007 12:00:00 AM
given a table of tax rates
------------------------------------------------
create table #taxeRates
(
taxRate char(3) not null primary key,
line int not null unique,
rate decimal(9,5) not null
)
insert into #taxeRates(taxRate, line, rate) values ('GST', 1, 5.0)
insert into #taxe... more >>
Removing Alphabets from Invoice No. for sorting purpose ?
Posted by luqman at 8/28/2007 12:00:00 AM
I want to remove Alphabets from Invoice No. for sorting purpose, how can I
?
Is there any function in Sql Server 2000 or Sql Server 2005 ?
My data is:
Actual Show as
A1234 1234
5234T 5234
B455 455
10101A 10101
The data should be ordered as under:-
455
1234
523... more >>
restore database
Posted by Roy Goldhammer at 8/28/2007 12:00:00 AM
Hello there
I have database that i restore from some point-of-time.
I choosed with norecovery and Overwrite existing database.
It said it did it successfuly but, it shows the database as unusable
(Restoring...)
what mode the database is in? and what is that thing?
... more >>
|