all groups > sql server programming > may 2004 > threads for tuesday may 4
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
Queries timing out...how to update query timeout value?
Posted by Tommy at 5/4/2004 7:16:02 PM
How can I update the query timeout value in SQL 2K? I have a batch of stored procedures that occasionally time out. How can I update the timeout value for a particular stored procedure
Thanks.... more >>
Help with query
Posted by Tamir Khason at 5/4/2004 6:38:24 PM
Please help me with complicated query:
eg I have table(tbl) with 2 fields (a,b) I need to delete ALL rows where
value in "a" field is dublicate, but leave one of each. in simple sentence I
need to delete invert distinct of field "a".
Please help me with this query
thx
... more >>
Auto-joining 400 times...
Posted by avenic at 5/4/2004 5:47:16 PM
Hello,
can SQL Server 2000 survive a join of a table on itself 400 times ?
Something like
SELECT *
FROM myTable AS t1
INNER JOIN myTable AS t2
ON t1.field2 = t2.field1
INNER JOIN myTable AS t3
ON t3.field2 = t2.field1
// and so on...
The table myTable would have only 10 colum... more >>
SQL returns unexpected results
Posted by Opa at 5/4/2004 5:46:03 PM
I'm trying to return the TOP n records of a SQL Server table as follows
SELECT TOP 5 SalesTransactionID as [Trans ID] FROM SalesTransactions WHERE SalesTransactionID > 101
I get
Trans ID
-----------
101
101
101
101
101
Ok So far
If I use an ORDER BY clause, I get unexpected result... more >>
Windows NT Security
Posted by Thomas Scheiderich at 5/4/2004 5:24:42 PM
I am trying to set up security for my intranet at work and want to find
out how to do a stored procedure to check Logons, usernames, passwords
and groups a person belongs to.
We are going to set up a special group to access some of the areas of
the site and I don't want to set up another se... more >>
Transaction Log Filling Up - SQL 2000
Posted by dbaqueen2000 NO[at]SPAM yahoo.com at 5/4/2004 5:19:15 PM
I am really confused and hope someone can help me out. I have a
script that will be distributed to our customer base in an upgrade of
our software. This script is ALTERing many tables to ADD a column
with a DEFAULT. Some of these tables have hundreds of thousands
records. When I am running t... more >>
Problem w/computed value update in Set in .asp page, but not sql enterprise manager
Posted by frentzenfan NO[at]SPAM yahoo.com at 5/4/2004 5:10:54 PM
Hi everyone,
I'm having this strange problem in and asp page that makes an update
call in sql but don't have the same problem in the enterprise manager.
userQuery = "update MonthlyReport set weight = 16 * weight;"
MainConn.Execute(userQuery)
Initial Values
5
10
20
Result:
Weight
... more >>
concurrency
Posted by Be Learning at 5/4/2004 4:20:17 PM
I'm learning How DBMS processes concurrency transactions.
Could you introduce me some material about this problem? It seems better to
have examples
Thanks a lot
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Updating an Image through a DataSet
Posted by Michael Maes at 5/4/2004 4:14:04 PM
Hello,
I have a DataTable containing an Image-Field (DataType Image). If I =
change the Image in the DataField and try to update the DataSource (SQL =
Server 2000 sp3) through the DataSet.Update() Call, I receive the =
following error:
'SqlException': The query processor could not produce a... more >>
Variation of Classic Self-Join Problem
Posted by Spring Chicken at 5/4/2004 3:54:43 PM
In the classic self-join example that we've all seen, an "employees" table
is joined to itself so that the immediate supervisor of each employee can be
returned. (to make sure we're on the same page, please refer to
http://www.onlamp.com/pub/a/onlamp/2001/07/12/aboutSQL.html for sample SQL
artic... more >>
Remove non-numeric characters from a string
Posted by Jonathan Blitz at 5/4/2004 3:26:06 PM
I have a column that contains phone numbers.
I need to strip out off the blanks, parentheses, minuses etc and leave
myself with just the 10 digits.
Is there any easy way to do this?
--
Jonathan Blitz
AnyKey Limited
Israel
"When things seem bad
Don't worry and shout
Just count up... more >>
SQL 7.5
Posted by BARBARA at 5/4/2004 3:01:05 PM
My son is starting his own business and mentioned SQL 7.5. However, I can't find it. I've only found 7.0. Is this 7.5 obsolete or am I doing something wrong? Thanks in advance.... more >>
Precision problem in SQL server
Posted by Mam at 5/4/2004 2:37:51 PM
Hi,
I have a big problem on precision, when I try to multiply
2 decimal datatypes or divide 2 decimal datatypes, The
results get rounded to 2 decimal places. But I need
atleast 12 dp.
Eg.,
declare @d1 decimal(38,12),
@d2 decimal(38,12),
@d3 decimal(38,12)
set @d1 = 1245879954685.... more >>
Will Yukon support global variables ?
Posted by Darko at 5/4/2004 2:36:14 PM
Is This Possible?
Posted by smrybacki at 5/4/2004 2:26:08 PM
I currently have a stored proc that uses a cursor that I would like to replace with a different (and hopefully faster solution). The problem is that what I need seems to be impossible to come up with without a cursor. What I really need is for one of the fields in an initial data put to contain th... more >>
Copying Table Structure
Posted by Joe at 5/4/2004 2:21:56 PM
Hello all,
I hope someone can point me in the right direction. One of the database
tables we use was poorly planned out. Initially, all data was deleted each
morning and the table was repopulated. Now, however, we are under tighter
time constraints and want to drop the table and recreate it... more >>
question about truncate table
Posted by joe at 5/4/2004 1:45:16 PM
Sorry for asking too many questions today.
the question is, if I truncate a table,
then those data are not going to transaction log.
So, is it still possible to rollback to get all my data back?
I know you can do restore database but assume we don't have any database
full/differential backup b... more >>
cursor, transaction isolation (vs. Oracle)
Posted by Daniel Billingsley at 5/4/2004 1:40:45 PM
I'm trying to wrap my brain around this whole concept of the integrity
provided by cursor and transaction isolation levels, and I'm still unclear
on some points.
My question a few weeks ago was regarding the default (read committed)
isolation that a cursor automatically has.
If I understand... more >>
Hash Join
Posted by joe at 5/4/2004 1:33:31 PM
Hi,
How can you explain Hash Join in a few sentences,
I know it's in book-online, but it's like a whole page of explaination.
... more >>
Transact-SQL help - efficient moving range calculation
Posted by The Enigmatic Mr. Jingo at 5/4/2004 1:13:16 PM
Hi all, I'm a rank beginner at Transact-SQL programming and I would
like some suggestions. What I need to do is calculate the moving range
average for a column in an efficient way. This will be part of a
stored procedure that works on SQL Server 7.0 and 2000.
For those unfamiliar with moving r... more >>
Functions and joined table as parameters
Posted by Phil396 at 5/4/2004 1:01:46 PM
I have function in a stored procedure that works fine by
itself, but when I try to use it in the select statment
it will not compile. The query is made up of many
different columns in a four table join.
I pass in a column from a joined query into the function
as a parameter
and I get all... more >>
Query to get a higher entry date for two similar ID's
Posted by Anil Khemchandani at 5/4/2004 12:51:03 PM
Hello Sir/Madam
I am pretty sure this is simple. But I guess I am having a temporary brain failure. I am trying to do a query on a table that has two identical entries on 2 separate dates. This is the case for thousands of records. I need to get only the latest date in my resultset. The only probl... more >>
SQL Server 7.0 and Visual Studio.NET
Posted by Sam at 5/4/2004 12:47:09 PM
Will SQL Server 7.0 work with ASP.NET/VB.NET? Also, will
it work with Office 2002? I to import data from tables
to insert into word templates.
Thanks,
Sam
MCP... more >>
Can I create Index in a part of a field
Posted by TkT at 5/4/2004 12:35:16 PM
I need create one index, but i need this index only have a
one part of a fild, example:
if the fild have 20 char's...
I need to create indice in the first 10 characters
it is that possible one?
pd... sorry by my badly english
... more >>
install more than one instance in a single drive
Posted by joe at 5/4/2004 12:34:34 PM
let's say I have one C: drive,
is it possible to install 2 instances on C drive or
I need to add an additional drive D:?
... more >>
find list of table names which do not have any indexes
Posted by joe at 5/4/2004 12:30:37 PM
Hi, how can I find a list of tables which do not have any indexes on them in
a database? I have too many tables in the database so i can't check them
one by one.
... more >>
Nested Query Problem or Grouping Problem
Posted by mike at 5/4/2004 12:02:13 PM
Hi. Any suggestions for this would be great!!!! It used to
work fine so I'm not sure what I did wrong. I have a view
that shown below (sorry for the length) that counts the
number of days from when an account was trained to when it
ordered, and the time between orders. The problem is that
... more >>
xml entity-encoding
Posted by Demetrius at 5/4/2004 12:01:07 PM
I am running a stored procedure to retriever a for-xml auto recordset. I understood from somewhere that "for xml auto" would replace the "special characters" (&, ', ", <, >). The only one being replaced is the "&". If I try to "manually" replace the others with replace()s, all the ampersands get ... more >>
FK between DBs
Posted by JIM.H. at 5/4/2004 11:33:17 AM
Hello,
Is it possible to have Foreign Key between databases? If
not, how could you provide data integrity if you have to
deal with two different databases?
Thanks,
Jim.
... more >>
DTS Failed
Posted by MS User at 5/4/2004 10:52:14 AM
SQL 2K
We have a job to run a DTS which loads and computes data from a database in
the same server..
This jobs worked till yesterday, failed today with error message
Executed as user: MyDomain\Myuser. ...: DTSStep_DTSExecuteSQLTask_11
DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_11 DTSRun... more >>
Crystal reports
Posted by Paul at 5/4/2004 10:42:28 AM
Hi, maybe off-topic but I've found this group to be full of very smart
people so I'll give it a try!
We currently have a lot of Crystal reports and we are considering changing
our philosophy on how we use it. We are thinking that instead of linking
tables, creating complicated sub-reports etc... more >>
Sort Using A View
Posted by Ted Stillwell at 5/4/2004 10:21:06 AM
I need to create a sorted view and then join it to another table to make a combined view for a report. How do I do this if I can't use Order By in views
Any help would be appreciated
Thanks
Ted... more >>
A Question of Tables
Posted by Astra at 5/4/2004 10:05:48 AM
Just to elaborate on this theme, is there anyway that I could adapt the
query so that if there isn't a price available in the STOCKPRICES table for
the currencyid specified then I can change my query to take the exchange
rate from a 4th table (or session var) and convert the default currency
pri... more >>
Trouble with query
Posted by Zoury at 5/4/2004 9:58:07 AM
Hi there! :O)
I've been trying to make a query, that seemed stupid in the first place, but
now i'm wondering what's the most efficient way to actually do it. here's
the create statements and explanations that goes with my problem.. watch for
line wrap. :
--------------------------------------... more >>
question on deadlocks involving counters
Posted by daveygf NO[at]SPAM yahoo.com at 5/4/2004 9:48:25 AM
We have a database that needs to keep track of how many reservations
are made. Each transaction will update Reservation table and
ReservationCount table. As you can imagine when you have several
concurrent connections attempting this transaction for different
reservations it produces deadlocks.
... more >>
concurrency
Posted by Aaron Bertrand - MVP at 5/4/2004 9:45:17 AM
Please fix your system clock.
"Be Learning" <coldman@hotpop.com> wrote in message
news:OztyGlbMEHA.4036@TK2MSFTNGP12.phx.gbl...
> I'm learning How DBMS processes concurrency transactions.
>
> Could you introduce me some material about this problem? It seems better
to
> have exampl... more >>
Check if SQL Server service is started for specific server
Posted by Hartmut at 5/4/2004 9:41:05 AM
Hi
in a custom action (VB.NET installer class) I need to create a database, initialze table values and so on. I realized this task in VB.NET (1.1) by calling an sql script (via shell and osql). Everything works fine until SQL Server service is not started or user has not sufficient rights for SQL ... more >>
What is meant by first normal form?
Posted by Paul BB at 5/4/2004 9:36:03 AM
Can somebody explain what is meant by first normal form
thanks, Paul.... more >>
sp_who and login starting with number
Posted by Mark Jackson at 5/4/2004 9:05:06 AM
If I have a login name starting with a number then I am unable to pass it to
the sp_who stored procedure e.g. sp_who '1A' as it returns an error that it
can't convert this to a number. Apart from taking the necessary code out of
the sp_who stored procedure and using that, is there any way to conv... more >>
IN Operator Question
Posted by Joe at 5/4/2004 9:01:13 AM
When I do this
select * from mytable where name IN ('Joe', 'Matt'
It will return all the rows with name 'Joe' or 'Matt' regardless the case
What if I want case sensitive
... more >>
Querying DB using multiple parameters
Posted by Patrick Delifer at 5/4/2004 8:26:16 AM
HI,
Is there a way to query the DB using a sp where I can have multiple
parameters (i.e an arraylist of parameters):
For example: Based on a list that the user has displayed (OrderID,
Address, etc.), I want to query the DB to return the exact list that the
user is seeing, after he modif... more >>
Count issues
Posted by toddack NO[at]SPAM hotmail.com at 5/4/2004 8:24:08 AM
When I run this query
SELECT DISTINCT BranchName, PersonID
FROM MembershipPersonsHistory
WHERE (CONVERT(varchar(10), '04/20/2004', 101) BETWEEN
EffectiveDate AND ExpirationDate)
Group By BranchName, PersonID
i get 2 rows, which is correct
but when I run this query
SELECT DISTINCT Bra... more >>
Loop in a trigger
Posted by Jim Abel at 5/4/2004 7:59:39 AM
I have a trigger that inserts 100 row into a related
table when a new recorecd is inserted into the parent
table. Currently I have 100 lines to insert each row and
was wondering if a loop could be written to replace the
many lines of inserts. Something similar to a for i <
100 loop?... more >>
Function with optional dates
Posted by Phil396 at 5/4/2004 7:39:12 AM
I need a function that will grab values for both a
regular table ( charge ) and a archive table
(archived) given a social sercurity number, customer id,
start date, and end date.
However the start date and end date needs to be optional.
The code runs fine outside of a function but when I try... more >>
db strategies
Posted by dotnet dev at 5/4/2004 7:23:17 AM
Hello,
Is there any decent book/white paper etc explains the strategies for
deploying and updating/maintaining the database applications in
subsequent releases using MSDE/SQL Server and VB.Net..
thanks
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in ... more >>
Row size - Not so Important
Posted by Konstantinos Michas at 5/4/2004 6:54:23 AM
Hello Experts,
Shouldn't the following query run?
select top 2 * from syscomments
order by number desc
OPTION (ROBUST PLAN)
Thanks in advance!... more >>
Auto Number Stored Procedure
Posted by Ashok at 5/4/2004 6:01:24 AM
Dear Sir,
I am a VB programmer and now working on SQL Server7.0.
In SQL Server I want to create a stored procedure named
sp_autoNumber which will giv me the maximum value of
specify field in specify database. So I write down this
statement in SQL Query Analyzer but it gives me an
error "... more >>
reference myself
Posted by TN at 5/4/2004 4:16:05 AM
I have a table following
create table
t int primary key not null
t2 int foreign key references t(t
I only want to select records to which have no record refer (more clearly : I only want to get records have no child
I write below
select * from t where t.t not in (select distinct t2 fr... more >>
Select where MAX = ?
Posted by Mark at 5/4/2004 4:09:07 AM
Hi - I have 3 tables, tblUser, tblRoles, and tblLevels - each user can
have access to one or more levels, connected through tblRoles.
What I want to do is select all users where there is a maximum levelid
of (example) 2.
My select is:
Select tblUser.uid, tblLevels.leveltxt, tblLevels.leve... more >>
Shortcut key
Posted by Kishor at 5/4/2004 2:46:04 AM
Hi all,
what is a short cut key provided by
Microsoft in Query analyzer 8 for jumping on result pane and source pane
Please let me know if anyone knows.... more >>
relationship cardinality?
Posted by Bob at 5/4/2004 1:31:39 AM
I've heard the term 'relationship cardinality' used from time to time and
sometimes I think it is referring to 1-to-1, 1-to-many or many-to-many
relationships.
Which one is it? Or is it all? It would be good to find out once and for
all.
Thanks in advance.
Bob
... more >>
Bulk Insert
Posted by James Autry at 5/4/2004 12:49:45 AM
Ok, I have to enter up to 3,000 records (56 bytes each)into a table in one
shot. It takes forever doing the standard dataadapter/update. I changed to
a stored procedure to save each record, but the time saved was negligible.
Increased connection packet size, no improvement. The only thing left... more >>
Importare dati con bcp in sql server 2000
Posted by s.borgia NO[at]SPAM tin.it at 5/4/2004 12:47:55 AM
Salve Ragazzi!!!
ho un problema che non riesco a risolvere e spero di riuscirci con il
vostro aiuto...
dunque..
ho un file csv tipo questo
Date,Aircarrier,CallSign,ComFltNbr,AcReg,AIPTDep,AIPTDst,STD,STA,AOBT,ATA,CancellationDate
01/2004,AZ,,0735,IDATD ,SKG,MXP,01/01/04 04:20,01/01/04 06:45,... more >>
Lock at Record level or Page Level (2)
Posted by Checco at 5/4/2004 12:26:02 AM
My index is non clustered because i need to insert often in this table.
Read past is useful only for some situations..
Why locked rows are not included in my output? Shouldn't be in the output without change (in the state the rows was before the transaction start)
Ther's an option in select claus... more >>
|