Viewing 15 posts - 31 through 45 (of 267 total)
Actually,
DATEADD(WEEK,x,somedate) Just adds 7*x days to the given date...
Not very useful at all.
The above functions don't give the correct results.
Try:
-- Input Variables
DECLARE @week INT, @year INT
SELECT @week = 35, @year...
August 31, 2004 at 4:19 pm
You cannot refer to a calculated column like in that way, it is not possible.
Try either:
SELECT
QTY,
COST,
TOTAL = QTY * COST,
NEW_TOTAL = QTY * COST * 1.05
FROM
ORDERS
SELECT
QTY,
COST,
TOTAL,
NEW_TOTAL = TOTAL * 1.05
FROM
(...
August 31, 2004 at 3:35 pm
"Giving everyone the option to change things not such a good idea from the testing standpoint!"
I can imagine 😉
Well I volunteer in any case.
Sending contact info by normal mail.
/rockmoose
August 29, 2004 at 2:47 pm
You are welcome.
If you use something like this make sure there are no gaps in the data.
There has to be an entry for every hour of the day otherwise you...
August 29, 2004 at 12:53 pm
Ok if were to say something positive about views, it might be this.
They Do provide an additional "abstraction" layer between the database and the client.
In this layer security and formatting...
August 29, 2004 at 12:45 pm
Hi,
If you can explode a table that contains the hourly rent for every hour and asset,
then this kind of calculations become more or less trivial.
/rockmoose
Provide sample schema, data and sql:
[cust]...
August 29, 2004 at 3:49 am
SqlServer is a database not a text editor 🙂
Have you read the manual ( BOL ) ?
INSERT MyTable(... column ....)
VALUES(.... 'my long string stuff' ....)
or
UPDATE MyTable SET
...
August 28, 2004 at 12:30 pm
A view is a derived table. ( in relational terms )
A procedure is some written code of arbirary complexity to perform some task.
Also procedures can have parameters.
If you just need...
August 28, 2004 at 12:18 pm
If you want too see the M$ code for these views, they are located in the master database.
( just make sure you can see sytem objects )
/rockmoose
August 28, 2004 at 12:04 pm
How do you format code in this forum !?
Not a html programmer 😉
/rockmoose
August 26, 2004 at 12:16 pm
Here is a set based solution.
Using derived tables and full join.
/rockmoose
create table #stories(
StoryID int not null,
LineNumber int not null,
Text varchar(8000),
primary key(StoryID,LineNumber) )
insert #stories( StoryId, LineNumber, Text )
select 33743, 1, 'GRT'
union...
August 26, 2004 at 12:13 pm
I guess Andy has been busy with the hurricane !
/rockmoose
August 26, 2004 at 9:31 am
You would have to do:
create table #freebaltb( ... table definition here ... )
insert #freebaltb EXEC GET_IVRSCRIPWISEBALANCE 888888888
/rockmoose
August 19, 2004 at 1:25 am
Why do you have to create the #Temp table Structure externally?
What are You trying to accomplish?
/rockmoose
August 18, 2004 at 7:43 am
Viewing 15 posts - 31 through 45 (of 267 total)