all groups > sql server programming > october 2003 > threads for saturday october 25
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
question money datatype
Posted by Fred Geurtsen at 10/25/2003 6:06:13 PM
Hi,
The result of my query is a money datatype, but it shows to 4 decimal places
> and I only want 2!!
Thx
... more >>
ntext, text and image in Trigger
Posted by John Koswalski at 10/25/2003 5:22:33 PM
Hello,
I've written a stored procedure to automate the creation of audit tables.
This works well. For the columns of tetx, ntext or image data type I have
opted not to include them as they do not work in triggers (error: Cannot use
text, ntext, or image columns in the 'inserted' and 'deleted' ... more >>
unique index
Posted by Eduardo Greco at 10/25/2003 3:51:03 PM
Hello!
I want to set a unique index for a field. But it's a new field and the
values are null.
Is there a way to ignore the nulls and validate the unique only for the new
values updated or inserted on the table?
Thanks.
Eduardo
... more >>
handling errors in transactions?
Posted by konsu at 10/25/2003 3:23:09 PM
hello,
i am trying to understrand the benefits of using SET XACT_ABORT ON instead
of checking for @@error after every single expression.
am i correct thinking that this code:
create procedure ...
as
declare @error int
begin tran
select ...
set @error = @@error if @error <> 0 g... more >>
Use latest results?
Posted by Stijn Verrept at 10/25/2003 2:26:22 PM
I have this situation:
I got a main table which contains Items and another table which is the
detail of the first and contains a datetime field.
Now I would like to create a view that lists all the fields of Items and all
the fields of the Details table but only of the latest datatime field.... more >>
Top 10 list
Posted by Adrian Foot at 10/25/2003 2:00:46 PM
Good afternoon Ladies and Gentlemen,
I wonder if anyone might be able to help with the a query that I am trying
to write to enable me to display a top 10 list of most connected clients on
my website.
I have a table in my SQL server database called 'Logging'. The time spent
online by each me... more >>
Browsing Data of Linked Server
Posted by Tanveer Malik at 10/25/2003 1:58:55 PM
Can we Browse the Data - Using SQL Query Analyser - stored on a Linked
Server ?
... more >>
How to the find the owner for a stored proc in mssql 7.0
Posted by anders at 10/25/2003 1:57:07 PM
Hello guys
how can I find the owner for at stored procedure in the system catalogue in
mssql 7.0. I know I can find it in INFORMATION_SCHEMA.ROUTINES when using
mssql 2000.
\Anders
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Incorrect syntax near 'Name'.
Posted by Young, Corey at 10/25/2003 1:49:28 PM
I am executing a SQL statement similar to the following:
set xact_abort on
update [MyServer].[MyDatabase].[Dbo].[MyTable] set [Last Name] =
'NewLastName' where [ID] = 'OldLastName'
MyServer is a linked server. MyDatabase is the name of a database on the
linked server. MyTable is the name ... more >>
Re:Store Procedure-Update multi records
Posted by Mok at 10/25/2003 12:50:38 PM
Hi:
I'm new in Store Procedure, i need some advice on this. I need to update
a table with multi record (eg invoice items) as below:
InvoiceNo LineNo Col1.....ColN
1001 1 ... .....
1001 2 ........ more >>
celko tree model - remove subtree
Posted by AWHK at 10/25/2003 11:54:52 AM
Hi,
I need to remove a entire subtree from the "celko tree model" and re-number
remaining nodes (-do i need re-number?).
Does anyone have the sql to do this?
awhk :)
... more >>
Same user logged in multiple times
Posted by Lasse at 10/25/2003 11:07:42 AM
Hi,
If several client applications connecting to the sql server are all using
the same login can that be a problem ? I was thinking if there could be
some internal jobs in the server that could be affected if there are several
connections for the same login.
Lasse
... more >>
Stored Proc: Updating a column with a column from the same table
Posted by Ron at 10/25/2003 9:13:40 AM
I am attempting to use a Stored Procedure to update a table. The update
should work by first setting the ThirdUpdt value to SecondUpdt, then setting
the SecondUpdt value to FirstUpdt, and finally setting FirstUpdt to the new
value. The order in which these values are updated is important. The Res... more >>
Function owner ...
Posted by Nicola Cisternino at 10/25/2003 9:11:12 AM
Hi all,
How can i call a "scalar-valued" function without owner ?? (i've just seen
that "inline" and "table-valued" don't require it .... ) ???
Thanks.
Nicola.
... more >>
Constraint PK
Posted by R-M at 10/25/2003 8:45:57 AM
Hi
I've created following table in SQL Server 2000:
table1 (f1 char(3),f2 char(4))
and f1 is PK.
to set a column as primary key,a primary key constraint would be
created,now is it neccessary to create a unique and clustered index on
f1(as I study the help, they automatically create... more >>
Matching Records - Please Help
Posted by rl_davis NO[at]SPAM charter.net at 10/25/2003 8:27:21 AM
What I need to know is all the shipments that went to a state and
those shipments that came out of a matching state within three days of
one another. The following are the fields in my table:
TblPaymentData
ID – Auto Number
Ship Date – Date
Shipper City – text
Shipper St... more >>
Question on VAT codes for EU countries...
Posted by Tom O at 10/25/2003 8:12:48 AM
I'm guessing that VAT ID formats differ between countries, what is the longest
length of a VAT ID?
Thanks,
Tom
... more >>
xp_cmdshell delete file in directory
Posted by Mickey at 10/25/2003 7:31:13 AM
I would like to delete a file if exist in a directory
(C:\file.bak) by using xp_cmdshell.
Please help me write the T-SQL statement.
Thank You,
Mickey
... more >>
Stored Procedure,retrievel to slow
Posted by Steven Derveaux at 10/25/2003 3:59:57 AM
I've made a select statement that has been build from a
couple of views and has a lot of calculations and
filtering.
When I execute that query in my Query Analyzer, it takes
only 1 or 2 seconds for executing. But when I put it in a
stored procedure i takes almost 16 minutes before i got m... more >>
|