Viewing 15 posts - 1,186 through 1,200 (of 2,171 total)
Try thisselectma.ma_idx,
ma.ma_kurztext_deu,
kd.kd_preis,
kl.kd_preis
fromdebitor as db
inner joinkondition as kd on kd.kd_pl_idx = db.db_ko_vkpreis
and kd.kd_vkorg = db.db_vkorg
inner joinmaterial as ma on ma.ma_idx = kd.kd_ma_idx
left joinkondition as kl on kl.kd_pl_idx = {table alias here}.db_ko_ldpreis
and...
November 8, 2007 at 2:21 am
I think there already are about 15 zillion postings about this exact problem.
Try to search this forum for similar requests and see what you get?
November 8, 2007 at 1:21 am
Before we can suggest anything at all, you need to prefix ALL columns with proper table name or table alias.
November 8, 2007 at 1:20 am
SELECTe.PatientID,
e.Qtr,
AVG(e.Days) AS avgLos
FROM(
SELECTm.PatientID,
m.ClinicUnit,
d.Qtr,
COUNT(*) AS Days
FROMMaster AS m
CROSS APPLY(
SELECTx.Date,
x.Qtr
FROMDates AS x
WHEREx.Date BETWEEN m.StartDate AND m.EndDate
) AS d
GROUP BYm.PatientID,
m.ClinicUnit,
d.Qtr
) AS e
GROUP BYe.PatientID,
e.Qtr
November 7, 2007 at 2:54 pm
Something similar to thisSELECTm.PatientID,
m.ClinicUnit,
d.Qtr,
COUNT(*) AS Days
FROMMaster AS m
CROSS APPLY(
SELECTd.Date,
d.Qtr
FROMDates AS d
WHEREd.Date BETWEEN m.StartDate AND m.EndDate
) AS d
GROUP BYm.PatientID,
m.ClinicUnit,
d.Qtr
November 7, 2007 at 2:44 pm
MarkusB (11/7/2007)
Peter Larsson (11/7/2007)
NVARCHAR is still 4000 bytes due to being double byte character sting (unicode).
Sorry Peter to correct you but nvarchar too is 8000 bytes, but the length is...
November 7, 2007 at 11:38 am
DECLARE@HEX BINARY(4)
SET@HEX = 0x00280000
SELECT(CAST(@HEX AS BIGINT) / POWER(2, 18)) & 0x1f
November 7, 2007 at 2:29 am
NVARCHAR is still 4000 bytes due to being double byte character sting (unicode).
November 7, 2007 at 2:24 am
That's 381.25 billion records in the table with an insert rate of 5800 records per second.
November 6, 2007 at 11:52 am
If this line of code do not return a record
SELECT @tmp = [Code] FROM LookupTable WHERE [Code] = @tmp
no variable is set! Not even to NULL. It is untouched.
November 6, 2007 at 6:08 am
CREATE TABLE#Sample
(
RowID INT IDENTITY(1, 1) PRIMARY KEY CLUSTERED,
theValue TINYINT
)
INSERT#Sample
SELECTABS(CHECKSUM(NEWID())) % 3
FROMsyscolumns AS c1
CROSS JOINsyscolumns AS c2
CREATE INDEX IX_Peso ON #Sample (theValue)
SELECTtheValue
FROM#Sample
WHEREtheValue = 1
/*
|--Index Seek(OBJECT: ([tempdb].[dbo].[#Sample]), SEEK: ([tempdb].[dbo].[#Sample].[theValue]=(1)) ORDERED...
November 6, 2007 at 12:45 am
SELECTCOUNT(DISTINCT lb.po_id)
FROMORDER_PO AS p
LEFT JOINORDER_SALES AS os ON os.Req_no = p.Po_id
AND os.Active = 1
LEFT JOINLIST_BASES AS lb ON lb.Base_id = p.Base_id
WHEREp.Requisition = 1
November 5, 2007 at 8:27 am
SELECT @Commission = min(select commission_cost)
FROM oe_line
WHERE order_no = @OrderNo
November 5, 2007 at 7:46 am
Viewing 15 posts - 1,186 through 1,200 (of 2,171 total)