Viewing 15 posts - 2,041 through 2,055 (of 5,504 total)
It depends on what you define as the range:
If you want to keep the column data type but compare dates, you have to use the proper data type leading to...
January 21, 2011 at 10:09 am
CELKO (1/21/2011)
The short version is that the PRIMARY KEY came from the need to have sequential...
January 21, 2011 at 10:00 am
In that case I would declare the variables as varchar instead of datetime.
January 21, 2011 at 9:52 am
It's most probably because of implicit conversion.
All your data will be converted internally to datetime when using the variables, since the datetime datatype has a higher precedence.
The two queries cannot...
January 21, 2011 at 9:30 am
bitbucket-25253 (1/21/2011)
Having worked in Mexico city, waiting on a shipment of tools from the U.S. and the clerk who told us just about what you experienced,was in the customs office.
We...
January 21, 2011 at 8:25 am
Did you measure the time to declare the cursor and to determine the value of @Proposal vs. actually processing the rows?
I'm not sure if those two together with the rest...
January 21, 2011 at 8:20 am
Depending on your required output
Select BL_ID,
sum(D.FRT_USD) as FRT_USD,
TEU,
SAISAN_MONTH
from tablename
group by BL_ID,TEU,SAISAN_MONTH
Or
Select BL_ID,
sum(D.FRT_USD) as FRT_USD,
MIN(TEU) as Min_TEU,
MIN(SAISAN_MONTH) AS Min_SAISAN_MONTH
from tablename
group by BL_ID
Or there might be the need of a subquery. It...
January 21, 2011 at 8:08 am
GilaMonster (1/21/2011)
...Yes, and I got a second meeting invite for Monday afternoon. Accepted that cause I just don't feel like fighting any more.
Unfortunately, a term like "mañana" seems not to...
January 21, 2011 at 7:11 am
please read and follow the instructions given in the first link in my signature.
You might also search either this site or Google for a solution. This is a rather common...
January 21, 2011 at 6:53 am
GSquared (1/21/2011)
There are multiple means of physically implementing row uniqueness. But "the primary key" != "primary key constraint". You have a set of columns that uniquely identify the...
January 21, 2011 at 6:46 am
It might help others if you'd include at least a reference to your other post and explain the different/additional requirement...
January 21, 2011 at 4:58 am
Glad I could help.
And I agree, the tally table article is a helpful read. But if you're actually start using the concept, it becomes a powerful tool.
January 20, 2011 at 1:25 pm
Did you actually read the article and try to follow the concept behind it?
Here's the crosstab version for your scenario.
SELECT
i,
p,
MAX(status) AS status,
MAX(CASE WHEN status='T' THEN amt ELSE 0 END)...
January 20, 2011 at 1:14 pm
parthi-1705 (1/20/2011)
I dont think so Cross tab will help here since i dont want data in horizontal or vertical i need just to add one column (Need Column4...
January 20, 2011 at 12:56 pm
CROSS APPLY together with some sort of a tally table should help here.
If you're not using a tally table yet, I recommend reading the article referenced in my signature.
DECLARE @tbl...
January 20, 2011 at 12:25 pm
Viewing 15 posts - 2,041 through 2,055 (of 5,504 total)