all groups > sql server programming > may 2005 > threads for sunday may 22
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
HELP ON XML
Posted by kishor at 5/22/2005 11:06:02 PM
Hi all,
I have a small query, may be this is not supported in SQL 2000. But at least
I want some round about way, which will solve my problem. I am here pasting
working code.
DECLARE @idoc int
DECLARE @doc varchar(1000)
SET @doc ='
<ROOT>
<Customer CustomerID="VINET" ContactName="Paul H... more >>
Date Issue!
Posted by AJ at 5/22/2005 8:00:01 PM
I am storing dates in SQL Server 2000 (Using ASP).
The date is getting validated against the Ymd format, by using SET DATEFORMAT.
In the Enterprise Manager - the date is displayed in local format (dmY).
When i run a store procedure manually it is returned as Ymd.
When i execute stored procedur... more >>
Conditional outer join help
Posted by janeNZ at 5/22/2005 7:19:33 PM
I need to do an outer join in order to retrieve info in cases where some
table data does not exist, but doing this causes my query to return rows I
don't want for cases where data does exist in all tables. I have simplified
the problem as follows:
Say my data looks like this:
Table A ... more >>
given 3 tables and values, search for rows in one table that match criteria in other two.
Posted by Hazz at 5/22/2005 5:38:26 PM
Given Block, HarvestBlock and VintageEst tables and value below, I would
like to be able to create a search to select rows in VintageEst for which
1. a search string match for the column BlockCode in the Block table
and
2. a vintage year match for the Vintage column in the HarvestBlock table.
... more >>
Indexing on calculated fields
Posted by celtic_kiwi at 5/22/2005 5:35:22 PM
I would like to index on a calculated field. I need to index records by
week and want to store the Week Number. Below is a test schema that
should work but the index will not create.
drop table calcdate;
create table calcdate
(
basedate datetime,
calcsun AS datediff(wk,[... more >>
find locks in a database by using sp_lock
Posted by Ron,hayim at 5/22/2005 3:59:01 PM
I’m trying to find locks in a database by using sp_lock. However the sp_help
give me an object name as a number. Does anyone have any script which
provide the tables name itself.
Best regards,
Ron
sp_lock to get the object number and then to translate the number to table
name. ... more >>
Using IN statement in T-SQL?
Posted by Ben Wallace (3) at 5/22/2005 3:02:35 PM
Passing a varchar paramter (12,34,55,67,554,567,66) to a sotred procedure.
It will be used as crteria of a select statement.
Is this valid:
WHERE ID IN + @param
Not sure how to approach this. This expression would be used in the last
statement of my proc. to filter a result set from a te... more >>
Update with data series
Posted by kopnet at 5/22/2005 1:16:03 PM
Hello for all
I need to fill records with data series for example 1,2,3,4,5 using one
update.
before update after update
Lp Lp
---- ------
0 ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
UDF Return a summed column
Posted by Stephen Russell at 5/22/2005 9:03:57 AM
I am having a brin fart this am???
this is what I want to do. I get SQL compiler error telling me that it
won't allow it :(
CREATE FUNCTION dbo.GetRepairTotal ( @iid int )
RETURNS decimal (9,2) AS
BEGIN
declare @ret decimal (9,2)
select CASE
WHEN sum(r.repaircost) IS NULL T... more >>
How to disable constraint
Posted by akej via SQLMonster.com at 5/22/2005 12:00:00 AM
I need to tu run TRANCATE TABLE however because of foregn key as described
in BOL i can't use this command,
my question is: Is it some way to disable constranit??
--
Message posted via http://www.sqlmonster.com... more >>
DISABLE TRIGGER
Posted by akej via SQLMonster.com at 5/22/2005 12:00:00 AM
How can i disable a trigger??
Any suggestion appreciated.
--
Message posted via http://www.sqlmonster.com... more >>
using the photo from Northwind.Employees
Posted by Ohad Young at 5/22/2005 12:00:00 AM
Hi,
I tried to load the images from the column Photo in table Employees in
database Northwind.
However, the content seems to be corrupted. When trying to desterilize it
to a Bitmap object an exception is raised.
I was wondering if someone succeeded to display one of the images in the
dat... more >>
How to Concatonate with Fixed Starting Positions
Posted by Rob at 5/22/2005 12:00:00 AM
I want to concatonate the following into ColumnReference
ColumnA + ColumnB + ColumnC + ColumnD
Each of these columns A-D may be variable in length, (but would never
exceed the position in the string I have provided). I would like to store
the values in ColumnReference in the following m... more >>
Convert from Varchar to datetime
Posted by Timmeah at 5/22/2005 12:00:00 AM
I have imported a text file and one of my columns has time stamped dates in
there.
eg. 10/11/2004 09:55:28
I want to convert this to a datetime field so that I can query the field
more efficiently.
When I tried to alter the populated table I receive the warning, data may be
lost converting... more >>
Update with data series
Posted by kopnet at 5/22/2005 12:00:00 AM
Hello for all
I need to fill records with data series for example 1,2,3,4,5 using one
update.
before update after update
Lp Lp
---- ------
0 ... more >>
problem in adding user and permission
Posted by AM at 5/22/2005 12:00:00 AM
Hi all
I want to create a sp which will from
Master database add user and give permission to that user to any
specified database using t-sql code.
How can I do it?
--
Thanks
Am
... more >>
|