all groups > sql server programming > december 2006 > threads for wednesday december 20
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
Avoiding Duplicate Text Data
Posted by Steve Harp at 12/20/2006 10:43:25 PM
Hi All,
I have a table that uses a text column to store lengthy (you guessed
it) text data. I need to write a store procedure that checks the
table prior to an insert/update to make sure the data isn't being
duplicated.
How can this be done with a stored proc?
Thanks,
Steve... more >>
transact sql output file
Posted by Adriano at 12/20/2006 10:24:10 PM
Hi,
Is it possible to define an outputfile to log all commands to, from =
within an osql session. Orcale has this fuction?
thanks... more >>
Table Size out of control...
Posted by Martin Fletcher at 12/20/2006 9:27:01 PM
I have identical databases (SQL 2005) at 5 seperate sites, One table size in
the database seems to vary greatly between sites. I have a program that
collects data from process control systems and stuff the data into this
table. Every 15 mins about 800 records are recorded. The size of the t... more >>
Urgent - Query
Posted by vanitha at 12/20/2006 8:07:00 PM
hi,
i have a table like
orderid int
trackid int
trackevent varchar(50)
values will be like
orderid trackid trackevent
1 1 'sample'
1 2 'process'
1 ... more >>
referential integrity
Posted by JJ at 12/20/2006 4:40:26 PM
I have table Test1 with columns
UserID
FirstName
LastName
Address
.....
.....
.....
UserType (only possible value is 1, 2, 3)
I have table Test2 with columns
UserID
QuestionID
But only the UserID with UserType either 1 or 2 can be stored in the second
table.
Would it still b... more >>
Problem with ID
Posted by shapper at 12/20/2006 2:34:05 PM
Hello,
I have a table where the primary key is FAQId which is a GUID.
My Procedure has a parameter named @FAQId.
I want to check if the is a record in the table where FAQId = @FAQId
Here is the important part of my code:
-- Find record with given FAQId
SELECT FAQId FROM dbo.by27_FAQ WH... more >>
Can I have a trigger based on a certain time?
Posted by Speech Lover at 12/20/2006 2:33:12 PM
I have been thinking about a way to recycle database every day at a certain
time.
Can I setup a trigger that's based on a time?
thanks,
... more >>
Reporting services and parameters
Posted by MarkusJNZ NO[at]SPAM gmail.com at 12/20/2006 1:20:16 PM
Hi, I have a basic report using reporting services using MSSQL 2000
The report is built by making a call to a stored procedure which takes
two arguments, a date and a string (These are declared as being of
types DateTime and nvarchar(20)).
In the report I have created two report parameters w... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
BULK INSERT Last Record Ouch!!!
Posted by csomberg NO[at]SPAM dwr.com at 12/20/2006 12:55:41 PM
I am working importing an ascii file over 2 gigs in size with DTS.
Everything works great until we hit the last record. Of course the last
record, column1 say END OF FILE instead of the expects numeric id
value.
How can I get this skipped/edited or ??? to make it work
Thanks,
Craig
... more >>
MSSQL losing statistics after service restart
Posted by Samuel R. Neff at 12/20/2006 12:30:40 PM
We're having a performance problem with one particular stored
procedure, GetRooms. This procedure is called often within our
application (several times a second) and we're seeing very
inconsistent performance in MSSQL 2005.
Most of the time GetRooms runs in about 35ms which is good. It
qu... more >>
SQL server error:Error converting data type varchar to float
Posted by jennihwahwa at 12/20/2006 11:36:50 AM
hi,
here is my SQL statement, for some reason, it keeps giving me "Error
converting data type varchar to float" error.
Anybody news how to resolve it?
declare @date as datetime
SET @date =
(SELECT max( create_Date )
FROM ba..RptAuto_Deficiency)
I... more >>
Using Input/Output parameters
Posted by sonny NO[at]SPAM nellhead.pointyhats.com at 12/20/2006 9:58:59 AM
X-No-Archive: Yes
Does anyone caution developers about the usage of output parameters as
input/output? I know, output parms in SQL Server ARE input/output, but
I've always been wary of using them that way. I think it makes
cleaner, more understandable code to use output parms only for output... more >>
UPDATE varchar(max) column using INNER JOIN with SQL2005
Posted by jesse.gavin NO[at]SPAM gmail.com at 12/20/2006 9:37:12 AM
I have a tabled named bvc_Product and it has a parent-child
relationship. I need to update the LongDescription column on all the
Child records with the LongDescription of the Parent record. So I tried
the following:
NOTE: LongDescription is of the type nvarchar(max)
========================... more >>
Is it possible to concatenate more then 2 columns using pl/sql
Posted by D at 12/20/2006 7:59:43 AM
Just curious, I'm looking to CONCAT(AREACODE,'-',PHONE_NUM) is this
possible using pl/sql. I know I can CONCAT(AREACODE,PHONE_NUM) but I
need more than two columns/values concatenated. Thanks!
... more >>
Simulating PRODUCT() in SQL Server 2000
Posted by richard.tallent NO[at]SPAM gmail.com at 12/20/2006 7:25:22 AM
SQL Server has no aggregate PRODUCT() function. I don't have SQL Server
2005, so I can't create a custom aggregate function (as described in
http://www.novicksoftware.com/Articles/sql-2005-product-user-defined-aggregate.htm),
I'm stuck with the POWER/SUM/LOG10 workaround
(http://support.microsof... more >>
lock question simple
Posted by Derek at 12/20/2006 6:25:46 AM
is there any point to issuing a tablock hint on an update statement?
update mytable with (tablock)
set mycolumn = 1
where myothercolumn = 'x'
myothercolumn is indexed and i think this hint will cause too high a
level of lock.
... more >>
Performance between databases
Posted by PBF at 12/20/2006 5:13:52 AM
Hi,
Why is inserting data into a table in database B, from database A,
slower than inserting the same data into a table in database A (from
database A)? The databases is on the same server.
P=E5l
... more >>
Stopping a trigger from being disabled
Posted by vbtrek at 12/20/2006 2:42:10 AM
We want to create a table that we don't want users to modify, so we
were going to add an encrypted delete trigger to stop deletes from the
table and an encrypted insert/update trigger that validates a checksum
on the table.
My question is how do I stop users from doing an ALTER TABLE x DISABLE... more >>
dynamic sql
Posted by lara at 12/20/2006 12:05:31 AM
Hi,
I got a problem with dynaic sql
My Application make use of 2 different databases , out of which one will be
a newly created one and the other will be an existing one .Depending on the
customers, the second db can have different names.And i wanna fetch some
data from these database ,... more >>
One of those best practice questions
Posted by Michael C at 12/20/2006 12:00:00 AM
Say we have a database which tracks customer orders with tables like this:
Product - list of products available
ID
Name
ProductItem - 1 record for each item that comes off the production line
ID
ProductID
Customer
ID
Name
CustomerRequest - order placed by customer
ID
... more >>
How would I achieve this?
Posted by Slug at 12/20/2006 12:00:00 AM
Hi all,
I have a table I want to update with data from another table... simple in
theory but not quite sure how to implement it due to the design of one of
the tables. Note that if a CustID does not exist in the dest table then we
will need to insert, not update.
The table being updated ... more >>
SQL2005 login
Posted by simonZ at 12/20/2006 12:00:00 AM
I changed port on sql2005 to 1400.
From local computer I can connect to server
(IP,1400) with sql login(sqldev) and everything works.
If I try to connect to the same sql server from other computer,
I get an error.
Login failed for user sqlDev.
What could be wrong?
There is no firewall and... more >>
multiple rows update!!! with trigger
Posted by sanju at 12/20/2006 12:00:00 AM
Hi,
I have a table called Photos, where user will have 1 to 10 photos and only
one photo will set to be active at any given point of time.(i.e IsPermitted
='True' and remaining all photos set to false),
user will have an option to make another photo as active.
when this happens newly select... more >>
Locking Info!!!
Posted by Vai2000 at 12/20/2006 12:00:00 AM
Hi All, If I use Selects in my query (ADO..NET) do I Have to use no lock in
the selects or SQL by defaults provides me a no lock?
TIA
... more >>
Database Access via ASP.NET and Speed
Posted by JJ at 12/20/2006 12:00:00 AM
My question is basically about whether its best to do a small number
database accesses and do most of the data organisation in sql stored
procedures, or one larger fetch from the database and do the database
organisation in the asp.net code:
I am building a menu system for an online store. ... more >>
|