all groups > sql server programming > december 2006 > threads for sunday december 17
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 return new ids from multiple row insert
Posted by Janet at 12/17/2006 10:33:16 PM
I am inserting multiple rows into a table using a simple insert/select
INSERT INTO @Category (Title, CategoryGroup)
SELECT Title, 3 FROM @Category WHERE CategoryGroup = 1
@Category - before insert
==================================
ID Title CategoryGroup
1 Category One 1
2 Category Two... more >>
Need a query
Posted by kalikoi NO[at]SPAM gmail.com at 12/17/2006 9:43:09 PM
Hi
i have the following query
select top 10 cola,colb,colc from table t where cold=somedate order by
cola desc,colb desc,colc desc
i have to modify the above query so that each column in the resultant
has to be ranked...to be more clear retrieve top 10 values of the three
columns from th... more >>
Return a value from stored procedure
Posted by Venky at 12/17/2006 9:37:54 PM
Hi,
In asp.net 2.0 am using SP for insert the details into the
database. After inserting the data am return the identity value.
Any one help me regarding how to return the value and how to get the
value is asp.net 2.0.
My SP code
BEGIN
BEGIN TRAN
INSERT INTO
Order_Details(Parcel_I... more >>
SQL replication
Posted by Venky at 12/17/2006 9:31:28 PM
Hi,
Anyone give me the document or tuorial links for sql replication?
Thanks
... more >>
Including a sum in a query
Posted by WiLLerZ at 12/17/2006 9:04:42 PM
I'm fairly new to SQL and am having trouble with something that I
imagine would be quite basic.
The following example is a table where it joins case details with time
spent on the case (individual activities):
CaseName | Customer | TimeSpent
Case_1 ABC Corp 2
Cas... more >>
difference between 2 dates
Posted by vanitha at 12/17/2006 7:57:00 PM
hi,
i want to find the difference between 2 dates in hh:mm:ss format.
example
startdate : 01-Dec-2006 4:27:00 pm
end date: 04-Dec-2006 7:09:24 am
pls help me to solve this. it's very urgent.
thank you
vanitha... more >>
Multiple Cascade Paths Error - Feature or Bug ;)
Posted by kosanovic NO[at]SPAM gmail.com at 12/17/2006 3:29:22 PM
I would like to hear your oppinion on the fact that SQL Server doesn't
allow you to make multiple cascading ref. integr. that lead to multiple
cascade paths. This can lead to cycling as the error says but the
keyword is "can" and SQL Server doesn't allow you to create even those
which don't lead... more >>
Date format
Posted by qjlee at 12/17/2006 2:38:00 PM
Hi, I have a question about the output for a date format
I have a table called clients. Within the table, there are two date field,
DOS (date of Service) and DOB (date of birth), Since this table is exported
from an excel spreedsheet, the format for these two field is YYYYMMDD.
I will ne... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
SELECT and concatenating columns only when 2nd column NOT NULL
Posted by Smithers at 12/17/2006 7:45:19 AM
CREATE TABLE [dbo].[People](
...
[FirstNameLegal] [varchar](35) NOT NULL,
[FirstNamePreferred] [varchar](35) NULL,
[MiddleName] [varchar](100) NULL,
[LastName] [varchar](50) NOT NULL,
...
)
I would like for a SELECT query to return a column named "FirstName" that..
1.... more >>
T-SQL inserting a file
Posted by Alur at 12/17/2006 7:43:00 AM
How can I insert any kind of file into
table using T-SQL ?
Could you give me some example ?... more >>
Recursive select statements solved in O(1)
Posted by Thomas Hansen at 12/17/2006 4:25:45 AM
Howdy, I've got this nifty way of taking a recursive select statement
and make them become O(1).
Often this is used if you have tables with foreign keys pointing into
itself!
For those interested, read up at:
http://www.frostinnovation.com/Blog.aspx
..t
... more >>
How to compare two tables of same structure using a hash/checksum
Posted by KarenM at 12/17/2006 1:51:16 AM
I have a source table and target table of the same structure.
My source table is a staging table I want to read records in my source
table and if the record does not exist in the target table do a insert
if the record is already in the target table I want to do a update if
the non-key fields h... more >>
[SQL 2005] SQLCLR UDT Comparison Methods
Posted by Mike C# at 12/17/2006 12:58:57 AM
OK, so I'm creating a simple UDT. I want to expose a method that performs a
comparison of two objects of the type of the UDT and returns a "boolean"
value based on the result that SQL Server can use in T-SQL statements and
expressions. I understand you can't override comparison operators lik... more >>
Database Corruption (Please help!!)
Posted by Leila at 12/17/2006 12:00:00 AM
Hi,
I created a nonclustered index on sysobjects table. After that, when I
create a new object and sysobjects is modified, the database does not work
properly. I used DBCC CHECKDB to repair it. It works but as soon as a new
object is created, again database get corrupted (CHECKDB reports erro... more >>
Generate Unique ID's
Posted by Dan Avni at 12/17/2006 12:00:00 AM
i need to do the following: i have a table with entries this table has a field RequestID (smallint). for some of the rows i need to generate a RequestID for the row. the RequestID must be unique, it
must be between 1 and 65535. when the pool of ID's is exhausted i need to start over. each request ... more >>
using functions on sql server
Posted by Roy Goldhammer at 12/17/2006 12:00:00 AM
Hello there
On many of my store procedures i do the Age calculation.
the caclculation is little complicated, and i would like to build function
instead of placing the formula on any view or store procedure.
the furmula is: datepart(year, getdate() - Dateofbirth) - 1900
i create functio... more >>
conversion from 'varbinary(MAX)' to 'ntext' is not supported on the connected database server.
Posted by yaser at 12/17/2006 12:00:00 AM
Hi all;
I have changed a column data type from ntext to varbinary(MAX), but when I
tried to return the data type to ntext I get the ERROR:
Conversion from 'varbinary (MAX)' to 'ntext' is not supported on the
connected database server.
Any advice.
Thank you
... more >>
|