all groups > sql server programming > april 2005 > threads for sunday april 3
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
find and replace
Posted by Aaron at 4/3/2005 11:06:32 PM
how do i write a query that will go through all the rows of a text field and
replace the search word with a new word.
like the find and replace feature in MS Access
REPLACE "ABC" WITH "CBS" IN DBTABLE.DBTEXT
Thanks,
Aaron
... more >>
Global prefixes available?
Posted by Dave Slinn at 4/3/2005 9:19:55 PM
Our business system consists of 4 separate database. One of these is a
Reference database that stores common look up tables, such as Countries,
Provinces, States, etc. When we want to access this information from
another database, we always prefix the table with the db name, then the
owner, as... more >>
Keep 1000 newest records... delete all the others
Posted by \ at 4/3/2005 8:35:54 PM
Ok... I'm trying to keep the newest 1000 records in my table,
and delete all the others.
There's got to be an easier/quicker way than this:
I create a derived table, sort it, looking at the 1000 newest
records... then ANOTHER derived table, sort it, looking at the oldest
of those 1000. Then... more >>
stored procedure question
Posted by Mohamed Shafiee at 4/3/2005 6:52:16 PM
Hi,
I am having a table stored in SQL server which has the following fields:
IslandCode, AtollLetter, IslandName, SchoolName, SchoolPhone, School1Name,
School1Phone, School2Name, School2Phone
The data types for SchoolName, School1Name, School2Name are the same. So is
that of the SchoolP... more >>
Divide by zero error?
Posted by William at 4/3/2005 3:55:22 PM
I have several situations where I encounter the following error:
[Microsoft][ODBC SQL SERVER DRIVER][SQL Server]Divide by zero error
encountered.
I'm sure this topic has been covered hundreds of times - but how would I
stop this error in the following query:
SELECT [Pharmacy Exp] / ... more >>
backing up SQL Server 2000 database to named pipe
Posted by miron at 4/3/2005 3:37:56 PM
would appreciate if you could comment on how to backup sql server 2000
database to named pipe
Thank you for your help beforehand,
Miron.
... more >>
Insert or Update in Store Procedure
Posted by Rudy at 4/3/2005 12:17:01 PM
Hello all!!!
Having problems getting my store procedure to work right. My goal is to have
my SP either update or Insert a new record in the "User_Profile" Table. I
can insert just fine, and update just fine, but not together. So if a user
name exists, it will update that row, if no name ex... more >>
stored procedure in a subquery for union
Posted by Opa at 4/3/2005 11:05:01 AM
Hi
I have a store procedure whose results I would like to use in a union all.
How to I get the results of a stored proc in a subquery and then use it?
example:
I would like the union to return the result for both stored proces (sp1 & sp2)
as in :
SELECT * (SELECT sp1)
UNION ALL
SELECT ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
use result set of sp in anoter query
Posted by Nay at 4/3/2005 10:39:03 AM
Hi
I have a SP which should return 2 result set(composed from 2 SP/queries).
But, the "where" clause of the second query dedends on the result set of the
first query.
So the naive way will be to query something like:
select id, description from table1 where code = @code
select * f... more >>
Help with wildcard numeric search
Posted by Shoeman at 4/3/2005 4:34:29 AM
I have constructed this stored procedure using union to let me find with
lots of flexibility. However one of the Parameters is a Numeric and I only
want to test if it's gtreater than zero. When I do an IF statement I get a
syntax error. I'm new to stored procs, this sort of thing would fly anywhe... more >>
|