Viewing 15 posts - 676 through 690 (of 2,007 total)
patelronaks1983 (5/9/2012)
HI.I need a date table that has all the dates from 2000 till today. the Table should look like as below.
DateSkDateDay
200001011/1/20001
200001021/2/20002
200001031/3/20003
200001041/4/20004
200001051/5/20005
200001061/6/20006
200001071/7/20007
200001081/8/20008
200001091/9/20009
how can i write sql query ?
SELECT DATEADD(D,N,'2000-01-01')...
May 9, 2012 at 10:15 am
Solomon Rutzky (5/9/2012)
I do not dispute your results, but I will dispute your test itself on the grounds that it is not relevant to a situation where someone should...
May 9, 2012 at 9:57 am
eseosaoregie (5/8/2012)
CREATE TABLE PRODUCTS(
Product_id int CONSTRAINT pk_products_pid PRIMARY KEY
,ProductName varchar(10) null
,ProductType varchar(10) null
,cost_price float null
)
CREATE TABLE SALES(
SalesOrder_id int CONSTRAINT pk_Orders_sid PRIMARY KEY,
Product_id INT CONSTRAINT fk_productSales_pid FOREIGN KEY REFERENCES Products(Product_id),
,quantity int...
May 9, 2012 at 8:44 am
michael vessey (5/8/2012)
I'm not sure if reading good suggestions from this forum would prevent many of newbies from being "promptly escorted off the premises" after interview with some of us...
May 8, 2012 at 9:48 am
Let's create some sample data to play with first.
SET NOCOUNT ON;
IF object_id('dbo.testEnvironment') IS NOT NULL
BEGIN
DROP TABLE dbo.testEnvironment;
END;
WITH t1(N) AS (SELECT 1 UNION ALL SELECT 1),
t2(N) AS...
May 8, 2012 at 9:33 am
I'm sure I've read it somewhere, but to be honest after a quick search all I can find is this: -
May 8, 2012 at 8:14 am
anthony.green (5/8/2012)
it is substituting 0 with the default date of '1900-01-01 00:00:00.000'
You can change the "zero" date at a server level, so test it before you count on it being...
May 8, 2012 at 7:23 am
Made a couple of errors in my previous posts.
DECLARE @ImportType INT = 7001, @ImportID CHAR(2) = '03',
@ImpDateFrom DATETIME = '2011-12-01', @ImpDateTo DATETIME = '2011-12-31',
@DateFrom DATETIME = '2010-01-01', @DateTo DATETIME...
May 5, 2012 at 4:57 am
Right, will probably have another look either tomorrow or Monday but for now I'm calling it a night.
Realised I didn't need the min or max over() so have got rid...
May 4, 2012 at 3:15 pm
blandry (5/4/2012)
No problem - if you can look stuff over in a couple days, that is just fine - this is not any emergency issue.
Thanks for the heads...
May 4, 2012 at 2:24 pm
Just started to download now, will take a look on Sunday or Monday depending on time.
May 4, 2012 at 9:22 am
vinu512 (5/4/2012)
However un-SetBased( 😛 ) or...
May 4, 2012 at 7:04 am
vinu512 (5/4/2012)
I really liked this one. Can this be customized a little more?
Like, if we have the following requirements:
1. We don't know how many rows there are in the...
May 4, 2012 at 5:59 am
blandry (5/3/2012)
Please check your private message - link and info are in there. BAK file is < 50MB, let me know if you have any trouble getting...
May 3, 2012 at 2:30 pm
roy.tollison (5/3/2012)
tbl1
f1 char(2)
f2 char(6)
f3 char(1)
f4 char(18)
f5 ...
May 3, 2012 at 9:12 am
Viewing 15 posts - 676 through 690 (of 2,007 total)