Viewing 15 posts - 4,771 through 4,785 (of 26,490 total)
J Livingston SQL (7/29/2015)
dandenise316 (7/29/2015)
I tried using the second solution with month(n.campaign_date)
..
WHERE
day(campaign_date) between 1 and 23
And I'm getting the following error.
ERROR: 42883: function day(timestamp without...
July 29, 2015 at 12:01 pm
below86 (7/29/2015)
July 29, 2015 at 11:55 am
Lynn Pettis (7/29/2015)
DECLARE @fiscal_year INT
SET @fiscal_year = 2015
DECLARE @fiscal_period INT
SET @fiscal_period = 11
DECLARE @Year SMALLINT,...
July 29, 2015 at 11:42 am
See my select statement at the end. I use your code to set the stage.
DECLARE @fiscal_year INT
SET @fiscal_year = 2015
DECLARE @fiscal_period INT
SET @fiscal_period = 11
DECLARE @Year SMALLINT, @Period TINYINT;
DECLARE...
July 29, 2015 at 11:38 am
J Livingston SQL (7/29/2015)
but heres an idea for MS SQL
SELECT TOP...
July 29, 2015 at 11:18 am
armoredeagle (7/29/2015)
July 29, 2015 at 10:47 am
This doesn't answer the question directly, but hopefully it helps you come up with a solution.
with rCTE as (
select
ag.id,
ag.catlevel,
...
July 28, 2015 at 3:55 pm
Not based on what you have posted so far. If you post the DDL for the table(s) including indexes and the execution plan (without the hint) as a *.sqlplan...
July 28, 2015 at 3:39 pm
Okay, obviously you are set on doing this using a loop instead of taking an opportunity to see if there may be a better way to accomplish the task.
July 28, 2015 at 3:37 pm
Okay, time for a Chicken Dentist 'cause I'm done trying to pull teeth on thread where someone thinks a loop is the only way to accomplish a one off report...
July 28, 2015 at 3:35 pm
sqlguy-736318 (7/28/2015)
ok I'll include an id in the result set and go through the while loop using select max(id).
How about answering the question as to why you have to process...
July 28, 2015 at 3:11 pm
anthony.r.colvin (7/28/2015)
@jacob WilkinsThanks for the breakdown I was unaware that Sybase was conducting the conversion behind the scenes. I will continue to use "between" from this point foward.
When working...
July 28, 2015 at 3:07 pm
sqlguy-736318 (7/27/2015)
declare @FieldVal int
while (select count(*) from @MyTempTable) > 0
begin
select top 1 @FieldVal = FieldVal from...
July 28, 2015 at 12:39 pm
mrhsham (7/28/2015)
try to change compatibility level to 80.
You do know that this is a 6 year old thread, right? The OP never really provided enough information to really give...
July 28, 2015 at 10:40 am
This has been deprecated:
Using the below query.
set rowcount 1
select * from employees order by id desc
Use TOP instead.
July 27, 2015 at 2:36 pm
Viewing 15 posts - 4,771 through 4,785 (of 26,490 total)