Viewing 15 posts - 76 through 90 (of 429 total)
Thanks to Kevin and all answers. 455 is good for this time.
This table has another columns. I got to group by and get the minimum number. If I loop through...
February 15, 2006 at 6:57 pm
Remove all characters in data. You have only numeric value now. Get the minimum of that numeric value. Return corressponding value from the column.
Data value 'AFGBS004SA55' is 00455
February 15, 2006 at 2:49 pm
More rules are needed however try this.
SET NOCOUNT ON
DECLARE @Position TABLE
(
POS_NO VARCHAR(10),
PC INT,
MC INT,
MS INT,
MV INT
)
INSERT @Position
SELECT '000114', 1, 2, 2, 0 UNION
SELECT '000114', 1, 10, 0, 10 UNION
SELECT '001596', 1,...
January 24, 2006 at 8:38 am
If it is classic asp you would have to go through a loop to diplay data in a grid. Better do it in the ASP.
In asp.net if databind is used to datagrid,...
January 12, 2006 at 6:18 am
DECLARE @orders TABLE
(
OrderID INT,
dateadded DATETIME,
OrderDet VARCHAR(100)
)
INSERT @orders
SELECT 1, '01/01/2005', 'Det1' UNION
SELECT 2, '02/01/2005', 'Det2' UNION
SELECT 3, '03/01/2005', 'Det3' UNION
SELECT 4, '04/01/2005', 'Det4' UNION
SELECT 5, '07/01/2005', 'Det5' UNION
SELECT 6, '08/01/2005', 'Det6' UNION
SELECT 7, '01/05/2005', 'Det7' UNION
SELECT 8, '01/08/2005',...
January 9, 2006 at 11:31 am
Change the field to datetime. In smalldatetime you already lost the sec information.
DECLARE @myDate DATETIME
DECLARE @mySmallDate SMALLDATETIME
SELECT @myDate = GETDATE(), @mySmallDate = GETDATE()
SELECT GETDATE() myGETDATE,
@myDate myDate,
@mySmallDate mySmallDate,
CONVERT(DATETIME, @mySmallDate) LostSecondsInSmallDate
December 9, 2005 at 11:58 am
I wouldn't do a string cocatenation for this. This will work for this as well.
SET NOCOUNT ON
DECLARE @Student TABLE
(
StudentID CHAR(7),
FirstName VARCHAR(50),
LastName VARCHAR(50),
BirthDate DATETIME
)
INSERT @Student
SELECT '1221144', 'Joe', 'Blow22', '11/25/1990' UNION
SELECT '1221145', 'Joe', 'Blow22', '11/25/1990' UNION
SELECT...
December 9, 2005 at 11:51 am
hah ha Why didn't I thing about that.
December 7, 2005 at 6:20 am
As Sergiy said create a table with all fields and for calldata make a query
SELECT name + '^' + address + '^' +...
December 6, 2005 at 2:41 pm
Original poster said
the join has to exist to, yes, the most recent, but yes, recent as per the purchase date. we don't want to reference an edition of...
December 6, 2005 at 2:35 pm
If we assume product_id and date are unique.
set nocount on
declare @Prod table (Product_id varchar(10), product_update_date datetime, haha varchar(10), hihi varchar(10))
insert @Prod
select '0001', '05-Dec-2005', 'aaa', 'bbb' UNION
select '0001', '01-Dec-2005', 'aaaa',...
December 6, 2005 at 1:33 pm
declare @cnt smallint
declare @counter smallint
set @counter = select min(id) from users
set @cnt = (select max(id) from users)
while @counter is not null
begin
update users set Password=left(replace(reverse(rand()),'.','0'),8) where id=@counter
set NOCOUNT ON
set @counter...
December 6, 2005 at 1:28 pm
set nocount on
declare @myData table (mytime datetime, Calls int)
insert @myData
select '12/01/2005 00:00', 100 UNION
select '12/01/2005 00:15', 200 UNION
select '12/01/2005 00:30', 210 UNION
select '12/01/2005 00:45', 250 UNION
select '12/01/2005 01:00', 300 UNION
select...
December 6, 2005 at 1:20 pm
create a dts package.
select XLS object and connection object from left window.
select a datatransfer task source is connection and destination is xls query is your sp. complete the rest of...
December 6, 2005 at 12:54 pm
Viewing 15 posts - 76 through 90 (of 429 total)