Viewing 15 posts - 16 through 30 (of 82 total)
Is Identity --> Yes
Identity Seed --> Starting value
Identity Increment --> Number to be incremented by i.e if the previous number is 2 and identity increement is next number would 2+1...
August 10, 2006 at 11:29 am
Check the BOL on SET ANSI_PADDING
PRINT 'Testing with ANSI_PADDING ON'
SET ANSI_PADDING ON;
GO
CREATE TABLE t1 (
charcol CHAR(16) NULL,
varcharcol VARCHAR(16) NULL,
...
August 10, 2006 at 11:24 am
After restoring the backup change the database collation to desired one. No need to change collation for every object.
August 9, 2006 at 12:49 pm
sp_rename 'Employee.addr1', 'Address', 'COLUMN'
August 9, 2006 at 11:46 am
add a default constraint with udf ie. UDF will return the max datatime from the same table.
August 9, 2006 at 10:23 am
declare @Lookup table
(
Acctint,
[Values]int
)
declare @Source Table (
Acctint,
[Values]int)
insert into @Lookup values (1,15)
insert into @Source values (1,10)
insert into @Lookup values (2,20)
insert into @Source values (3,20)
insert into @Lookup values (3,30)
insert into...
August 8, 2006 at 5:36 pm
I would recomment the second option with slightly different approach.
declare @Customer table
(
CustomerID varchar(2)
)
insert into @Customer values ('AA')
insert into @Customer values ('BB')
insert into @Customer values ('CC')
insert into @Customer values ('DD')
insert...
August 8, 2006 at 5:23 pm
Hi Vandy,
You can try adding -1 and -3 to get the system date, getdate().
select Customer,Sum(Sales) as Value
From SalesF
where DateInvoiced between dateadd(d,-1, GETDATE()) and dateadd(d,-3, GETDATE())
Group By Customer
Hope...
August 8, 2006 at 9:37 am
use information_schema.columns view. Rest is same as you did for SQL Data
August 7, 2006 at 4:23 pm
Check the variable declaration. I think you are using @@ instead of @ for variable.
August 7, 2006 at 2:31 pm
SELECT * FROM my_table
WHERE created_date BETWEEN cast('8/1/2006 12:00AM' as datetime) AND cast('8/1/2006 11:59:59PM' as datetime)
August 7, 2006 at 12:13 pm
Hope this works for you... atleast for the first result set...
Could add more description to your question...
set nocount on
declare @Order table
(
Number int,
[Value] int,
Location varchar(10),
[Order] int
)
insert into @Order values...
August 7, 2006 at 11:55 am
Is it possible for you to send the portion of the code?
August 7, 2006 at 9:34 am
Max will return null if there are no records in the table. please check...
August 2, 2006 at 10:04 am
Viewing 15 posts - 16 through 30 (of 82 total)