all groups > sql server programming > december 2006 > threads for thursday december 7
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
How to handle insert/update sprocs with common business logic?
Posted by Tadwick at 12/7/2006 11:57:00 PM
Is it best to keep all insert and update statements in separate sprocs even
if they share common business logic for validation/calculation etc? Is it
possible and/or even preferable to create a single sproc for the business
logic and call it from the separate insert and update sprocs? Does t... more >>
Share dynamic .NET classes between SQL Server and app business layer?
Posted by cpnet at 12/7/2006 11:20:17 PM
I want to be able to provide an easy way for users to dynamically create
calculations to run on data in my database (SQL 2005). The data that the
calculations will process will be in XML format stored in a field in the
database. I want the user to be able to use my application write an
equ... more >>
question on data structure theory
Posted by Paul Pedersen at 12/7/2006 10:40:32 PM
I have what I think is a relatively simple problem and a proposed solution.
If anyone knowledgeable can comment on my proposed solution, I'd be
grateful.
The application is similar to POS. Two types of items will be sold, say,
"products" and "services". Products and services are sufficientl... more >>
query
Posted by vanitha at 12/7/2006 8:36:00 PM
hi,
13 month trend records, so to get the previous month, we are using statement
like this, with the month, i also want the year, the problem is before jan
2006, it is dec 2005, but it is displying it as dec 2006, as the @startdate
year is 2006.
please help me to sove this
substring... more >>
DataBase name in Sql server
Posted by vipin at 12/7/2006 8:20:44 PM
hi,
how can i get all the server name which is run in networking
how can i get all the database name form server
pls help
... more >>
copy stored procedure
Posted by Ginger Estherskip at 12/7/2006 5:28:34 PM
I need to copy a bunch of stored procedures (and permissions) again and
again from one database to a ton of identical databases on the same server.
What I'm thinking is that I'll write a procedure that takes a stored
procedure name as a parameter and then copies that to all the other
databas... more >>
error Missing object type mapping in IxFromObjtype
Posted by Dave at 12/7/2006 5:11:01 PM
I'm trying to create a scalar UDF and I get the following error message:
error Missing object type mapping in IxFromObjtype
Running SQL Server 2000 SP4 on Windows 2003.
Any ideas what could cause that message? ... more >>
SQL Server agent
Posted by Ed at 12/7/2006 5:01:00 PM
Hi,
If I create a DTS/SSIS package but I use SQL Server Login not NT Login for
Source and Destination as the connections, do I still need to change the
agent startup account which has permission of both machines in order to have
a job to run the package? Can I use Local System to run sinc... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
concatenating column values without a cursor?
Posted by Keith G Hicks at 12/7/2006 4:13:58 PM
Some time ago, someone in here showed me this type of code for concatenating
column values together. I've used it in cursors and it works fine.
DECLARE @Kids VARCHAR(1000)
SELECT
@Kids = COALESCE(@Kids + ', ', '') + KidName
FROM
CustKids INNER JOIN Custs ON CustKids.CustI... more >>
skip a value in an update statement
Posted by Matt at 12/7/2006 4:04:00 PM
Is it possible to skip a value in an update statement? I'm updating from one
table to another and if the value of any field is null on table 1 I don't
want to update that field on table 2.
Here's the basic update:
Update Table2
Set column1 = T1.column1
Set column2 = T1.column2
S... more >>
INNER JOIN help
Posted by trint at 12/7/2006 1:33:50 PM
I have to describe a select by going through the following:
I have a table called categories
My select works like this:
SELECT *
FROM categories
where id = 965
I have another table called product_category
I need some numbers from it:
SELECT *
FROM product_category
where category_id... more >>
How to get reverse results
Posted by KMG at 12/7/2006 1:15:06 PM
I have a query that gets results based on several factors, and I want to get
the reverse of that. For instance, my query is something like this:
Select * from tblclients where fname like 'victor%' and lname like 'San%'
How do I reverse that so I get everything but like Victor San?
... more >>
db_owner <> dbo ?
Posted by xamman at 12/7/2006 1:07:13 PM
hi there,
if *all* users are members of db_owner in a database and they are
creating tables (e.g. jane.sales, peter.customers) and wish to access
and reference each others tables will the
db_owner membership prevent the issue of broken ownership chains?
is the situation above functionally... more >>
AutoNum in SQL
Posted by Rich at 12/7/2006 11:17:55 AM
I am importing a delimited file in to my SQL table. I gave the table an
identity column to use as the primary key. I want to import the flat
file into the table and have a unique value automatically assigned.
However, it errors out upon import.
I could do this programatically i suppose, but wa... more >>
Cursors in SQL Query
Posted by ipramod NO[at]SPAM gmail.com at 12/7/2006 9:46:48 AM
Hi,
I have 50 queries that retrieves data from the tables using Cursors in
SQL query.
The query first creates a cursors which contains all the database names
and then for each database it retrieves the table values like below
query:
SET nocount on
-- CURSOR DECLARATION
DECLAR... more >>
Retrieve data coming from different sources
Posted by Nikky at 12/7/2006 7:12:00 AM
Hi everybody !!!
I need to retrieve data coming from different sources (different Oracle
databases), but I need to do it in one single SQL SELECT statement. Is it
possible?? I need to do it this way because I have to display this retrieved
data in one single GridView control in a web applic... more >>
OPENXML Question
Posted by John Doe at 12/7/2006 5:07:38 AM
I am using the OPENXML feature of SQL 2000. When I pass in the XML
structure I want to be able to do a upsert. What is the syntax for IF
EXISTS.... regarding xml? I have supplier_id I want to compare in the
xml to a table in db. Note the xml repeats so I need to do it for each
supplier_id. th... more >>
Comparing two tables.
Posted by Npavan.Reddy NO[at]SPAM gmail.com at 12/7/2006 4:58:07 AM
Hi
This is my case:
1) I have a master table. Lets call it invoice_master. these are the
fields inv_no,inv_date,Po_no,amount.
2) I will be getting an updated table every week with new records of
invoices. lets call it updated_invoices.
3) So I need to use a query to select rows which ... more >>
copying data from one database to other at frequent basis
Posted by thaks at 12/7/2006 3:10:34 AM
hi,
There is a database containing many tables in which there are two types
of data:
1)first kind of data which is permanent data
2)second kind of data which keeps on changing on daily basis
So I need to copy second type of data into my database which needs to
be done on daily basis so tha... more >>
Update blocking, no sign of deadlock
Posted by Damien at 12/7/2006 2:13:37 AM
I've got a relatively simple update statement which seems to be
blocking, but not in a way that shows up in sp_who2/sp_lock/Enterprise
Manager.
Almost as soon as I start the execute statement from query analyzer, I
see another process , one of the TASK MANAGER processes, block against
my SPID... more >>
Copying an SQL2000 database
Posted by Goofy at 12/7/2006 12:00:00 AM
Hi,
I want to copy a database from my production server to my local machine
server for test purposes. I've tried exporting to a new database, but it
fails.
What is the best way to acomplish this ?
Thanks In Advance
--
Goofy
... more >>
escape characters
Posted by luna at 12/7/2006 12:00:00 AM
in vb im replacing single quote ' with two single quotes '',
to allow input into the database
replace(string,"'","''") etc.
simple enough and it works fine however its storing both the quotes in the
database, why would it be doing this ?
When the data is retrieved and saved it saves the quotes... more >>
relationship question (conceptual) - beginner
Posted by retf at 12/7/2006 12:00:00 AM
Hi All.
I need make one relationship between 3 tables, but I don't know how to make
this.
Think that I have one table:
'clients'
and one cliente can be an 'person' or an 'company'.
How is the correct way to make this?
'persons' 'companys'
| |
... more >>
SQL 2000 - changing datatype numeric problem
Posted by Aroo at 12/7/2006 12:00:00 AM
Hi.
I have a database with a few tables with columns of datatype
numeric(18,2). For now I have to change this type to numeric(9,2). But after
alter table script the size of data in these tables didn't change. I've
tried to shrink database and shrinkfile and this does not make any effect.
... more >>
Do i need to activate some types in sys.fulltext_document_types
Posted by yaser at 12/7/2006 12:00:00 AM
hi all;
I heard that I have to activate some supported types for full-text search;
like if I want to search in HTML document (.html) I have to activate the
search for HTML or PDF ...and so, and what is the types activated by
default.
When I retrieve all the types by:
select * from sys.fullt... more >>
about OBJECT_ID
Posted by prefect at 12/7/2006 12:00:00 AM
with Management Studio on SQL Server 2005, i have done some tests.
when i execute following script
SELECT OBJECTID('TESTDATABASE..TESTTABLE')
while master or some other database is selected on the available databases
list, i get the object id. but with some other database selected , i ge... more >>
|