Viewing 15 posts - 1,186 through 1,200 (of 1,228 total)
There's yet another way to do this if you want an output row for each code - with OR in the join to the lookup. This isn't often recommended because...
January 24, 2010 at 4:08 am
mail 41752 (1/23/2010)
Can this be accomplished with a single SELECT statement...?
Yes.
DROP TABLE #Table1
CREATE TABLE #Table1 (FieldA INT, FieldB INT)
INSERT INTO #Table1 (FieldA, FieldB)...
January 24, 2010 at 3:48 am
Here's a completely different way which returns the codes in the same row.
CREATE TABLE #A (id INT, FCode CHAR(10))
INSERT INTO #A
SELECT...
January 24, 2010 at 3:31 am
SELECT c.crs_id AS id,
crs_name,
crs_author,
sch_start,
sch_end,
intro,
recorded,
edit_av,
[time], ...
January 24, 2010 at 3:12 am
lmu92 (1/23/2010)
I...
January 23, 2010 at 1:53 pm
ALTER VIEW [dbo].[vw_AssetCommonDetail]
AS
SELECT d.AssetID, d.Location, d.Tower, d.[Floor], d.Cubicle, d.BaseVendor, d.Vendor, d.AssetType, d.AssetUser, a.AssetType
FROM (
SELECT DISTINCT AssetID, Location,Tower,[Floor],Cubicle, BaseVendor, Vendor, AssetType, AssetUser
FROM Blackberry
UNION
SELECT DISTINCT AssetID,...
January 23, 2010 at 12:09 pm
Strong hint!
Write a query which returns the following result set:
malli 2
reddy 2
- then post it here.
January 23, 2010 at 9:42 am
That's because @PivotCliPadres variable is too short, the value is truncated.
However, @PivotCliPadres contains duplicate values, even if PIVOT can deal with this, it's almost certainly not what you want.
Can I...
January 23, 2010 at 3:08 am
We use three tables for this:
an Item table with pk ItemID
a Category table with pk CategoryID
an ItemCategory table with pkItemCategory and fk's ItemID and CategoryID
There are no limits (to...
January 21, 2010 at 2:21 pm
NY, NY - so good they named it twice. Ok, are you entirely happy with these results? Is the data exactly what you would expect to see?
January 21, 2010 at 12:24 pm
Those six correlated subqueries all point (correlate) to the same row in table tblstatusmaster, so why not change the query so that tblstatusmaster is LEFT JOINed in the FROM list...
January 17, 2010 at 4:42 am
Could you use unpivot for this? I'm sure you could, if you were to pivot the data first. You don't need to, it's a very simple requirement:
SELECT *
FROM (
...
January 16, 2010 at 2:51 am
The LIKE is not necessary.
WHERE o.uid = ISNULL(@Var, o.uid)
AND indid IN (0, 1, 255)
AND o.type = 'U'
January 13, 2010 at 2:28 pm
This is probably a quick and dirty fix until your developer is available, but you could try the LEFT function as follows:
select tm.Title, tm.primary_id ISBN13,
cust_D, c.Name, Doc_Ref INVOICE_ID,
isnull( sum(BO.DEL_QTY),0) BO_DEL_QTY,
isnull(sum(BO.UNS_QTY),0)...
January 13, 2010 at 2:23 pm
ifila (1/13/2010)
I dont have a 'rowid' column on my table. Is the only solution to add this to my table as a workaround?
No. You don't need it at all. But...
January 13, 2010 at 12:53 pm
Viewing 15 posts - 1,186 through 1,200 (of 1,228 total)