Viewing 15 posts - 1 through 15 (of 17 total)
I thought that was too simple...
I might try building this dynamically then, as if it were a program in C/VB/Java....
Example of what I mean:
declare @one varchar(255)
declare @two varchar(255)
select @one...
November 19, 2003 at 10:28 pm
Not completely clear from your example if this helps, but for what it's worth:
*********************
declare @one int
declare @two int
declare @three int
SELECT @one = 1 , @two = @one + @one,...
November 19, 2003 at 8:03 pm
I used Google and found these links:
http://jan.ucc.nau.edu/~cvm/latlongdist.html (code is in Perl)
http://www.freevbcode.com/ShowCode.Asp?ID=5532 (code is in VB)
http://www.hotscripts.com/Detailed/20791.html (various code, including C/C++)
I might take a crack at...
November 17, 2003 at 3:37 pm
You're probably looking to use ISNULL(). Something like:
SELECT ISNULL(t1.col1,t2.col2)
FROM table1 t1, table2 t2
WHERE ....
The t2.col2 could also be a seperate SELECT statement if the tables don't join in the query,...
November 17, 2003 at 3:08 pm
SELECT ...
FROM ...
WHERE myCol >= DATEADD(dd, -7 + -DATEPART(dw,getdate()), CONVERT(char(8),getdate(),112))
AND myCol < DATEADD(dd, 1 + -DATEPART(dw,getdate()), CONVERT(char(8),getdate(),112))
This should capture the previous weeks end points dynamically, and also allows you to...
November 15, 2003 at 5:10 pm
Just found this via the next post ...code is ASP, so you should be able to use alot of it as is.
http://www.nigelrivett.net/DBAccess.inc.html
Thanks to Nigel for sharing the scripts.
Jeff
...
November 15, 2003 at 3:47 pm
Look at:
xp_sendmail
in the online books - it should explain all the parameter values well enough for your emails. Simply create a VB connection and...
November 15, 2003 at 3:40 pm
Going out on a limb here to contradict some people who are obviously more experienced than I...where's that damn ripcord!
The posters in this thread seem to assume a few things:
1)...
October 30, 2003 at 3:52 pm
Try using more than one connection object. The same connection cannot start the next query with pending results in MS SQL Server - we run into this alot with various...
October 29, 2003 at 3:24 pm
Everything in your code looks fine - did it fail for you?
When inserting with an identity column, just leave that column out of the insert.
Ex:
create table tbl_users
(
idcol int IDENTITY (1,...
October 26, 2003 at 3:55 am
Check out lowphat's post from a couple of days ago:
October 26, 2003 at 1:28 am
If the other database is linked, just refer to the table by its full name (myServer.myDatabase..myTable). If they're on the same machine, I think you can leave off the servername...
October 26, 2003 at 1:12 am
OK, here's the code:
***************************************
if exists (select * from sysobjects where id = object_id(N'[dbo].[listResults]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[listResults]
GO
create procedure listResults
as
begin
declare @onePass int
declare @seq int, @kuks int , @countTdkuks...
October 26, 2003 at 1:00 am
Zaza,
Use a CASE statement:
(CASE A.PDepartment WHEN '' THEN B.PDepartment ELSE A.PDepartment END ) CaseCol
Be sure to give the case column an Alias or the View won't...
October 24, 2003 at 5:25 pm
hi synakamr,
I came up with the same query as David, which made me realize your problem. David's query produces:
SEQ KukS ...
October 24, 2003 at 4:01 pm
Viewing 15 posts - 1 through 15 (of 17 total)