Viewing 15 posts - 91 through 105 (of 156 total)
CREATE TABLE #t (V varchar(5))
INSERT INTO #t VALUES ('10')
INSERT INTO #t VALUES ('20')
INSERT INTO #t VALUES ('30')
INSERT INTO #t VALUES ('A10')
INSERT INTO #t VALUES ('0D830')
SELECT V, ISNUMERIC(V) IsItNumeric FROM #t
--...
May 12, 2006 at 10:01 am
select ProductID,ProductName,SupplierID,
CASE WHEN ProductID < 11 THEN 'P' + CONVERT(varchar(2),ProductID)
ELSE 'PN'
END As NewP
FROM Northwind.dbo.Products
May 11, 2006 at 3:15 pm
Right click on the Server in Enterprise Manager and select 'Edit SQL Server Registration Properties'. See if the Show system databases and system objects is unchecked. Check it to see...
May 9, 2006 at 6:17 am
DECLARE @tblNumbers TABLE (ID int)
INSERT INTO @tblNumbers VALUES (1)
INSERT INTO @tblNumbers VALUES (2)
INSERT INTO @tblNumbers VALUES (3)
INSERT INTO @tblNumbers VALUES (4)
INSERT INTO @tblNumbers VALUES (5)
INSERT INTO @tblNumbers VALUES (6)
DECLARE @tblNumA...
March 22, 2006 at 8:55 am
Wow. That query really rocks. I thought I would need to call a function in the Order By clause. Thanks a bunch.
Currently the table goes to 8 levels down. I...
March 15, 2006 at 7:08 am
The first "sort" is done on Node. The first row is a Level 1. From the sample data, 20433 is a child of 7264 and 40264 is a child of 20433.
If...
March 14, 2006 at 3:17 pm
Oops. Here is the revised desired output.
Node |
Level
LastChildID
March 14, 2006 at 11:58 am
SET NOCOUNT ON
DECLARE @tbl TABLE (RowID INT IDENTITY, descr varchar(10) )
insert into @tbl
SELECT 'a'
UNION
select 'b'
UNION
select 'c'
UNION
select 'd'
UNION
select 'e'
SELECT * FROM @tbl
DBCC CHECKIDENT('@tbl',NORESEED)
Error : Could not find a table or...
March 1, 2006 at 1:43 pm
Yelena,
Your query returns Null. I changed the query but still can go up 1 row only.
CREATE TABLE #Test (ID int, LocationID varchar(20), DeletedFlag bit, LinkID int)
INSERT INTO #Test VALUES...
January 31, 2006 at 11:00 am
Noeld, thanks for your input. But this still does not give me the result I expect.
January 10, 2006 at 12:42 pm
First compare 'a;b;a5' and 'a;b;a3' Both have 3 items but the type of material is 'B' for the first one ('a;b;a5' ) and 'C' for the second ('a;b;a3' ). So...
January 9, 2006 at 1:03 pm
Both are level 3 (3 items) and both have type of material as B.
Description 'Desc aca' comes before 'Desc acd' so 'a;b;a5' comes before 'a;b;a3'
January 9, 2006 at 12:15 pm
Instead of running 2 queries from .Net, make one trip to the server to get the data.
Thanks PW, it worked.
January 3, 2006 at 2:22 pm
This query does not return any rows.
USE Pubs
Go
SELECT au_lname, au_fname, employee.fname, employee.lname
FROM authors, employee
WHERE authors.au_id = '472-27-2349'
AND employee.emp_id = 'ZZZZZZZZ'
what I would like to return is
Gringlesby Burt Null Null
Is this...
January 3, 2006 at 11:27 am
But this will not return any result if TableB has no row with ID=2 and TableA has row with ID =1
I would still like to return all rows from TableA...
January 3, 2006 at 8:12 am
Viewing 15 posts - 91 through 105 (of 156 total)