Viewing 15 posts - 586 through 600 (of 1,229 total)
SQLKnowItAll (1/17/2012)
L' Eomot Inversé (1/17/2012)a set of datakey-landline pairs such that each landline and each datakey occurs only once
As far as I can tell, this is an impossible statement without...
January 17, 2012 at 11:17 am
captcooldaddy (1/17/2012)
sorry. it's coming in a different columnselect replace('1 - Apr',' ','') dt, 2010 [year]
into #test
select dt,year --how do i convert this varchar to a datetime
from #test
Can you set up...
January 17, 2012 at 10:18 am
sami.sqldba (1/17/2012)
Try this it will make you insert from other table and id starting with 1000000
DECLARE @START INT
DECLARE @END INT
SELECT @START = 1000000 --START VALUE
SET @END = (SELECT COUNT(*)...
January 17, 2012 at 9:10 am
How do I copy code from the forum to paste into Management studio, without having to refomat it myself everytime?
Paste it into a word document, then copy and paste again....
January 17, 2012 at 7:31 am
bicky1980 (1/17/2012)
The datakey & landline doesnt exist in my final table
That's going to happen - can you post the results of the query I posted last?
I edited the query at...
January 17, 2012 at 6:09 am
bicky1980 (1/17/2012)
I had 4 records with the same datakey and same landline, but these results were excluded from...
January 17, 2012 at 5:42 am
Hi Bickie
Here's a solution which seems to work with an extended sample data set.
Sample data:
DROP TABLE #test2
CREATE TABLE #test2 (indkey NVARCHAR(2), datakey NVARCHAR(4),...
January 17, 2012 at 2:57 am
bicky1980 (1/16/2012)
...And what does that mean?
They're solutions to a particular type of problem, well known and defined, and I think it's fair to say that one or two folks will...
January 16, 2012 at 4:00 pm
SQLKnowItAll (1/16/2012)
bicky1980 (1/16/2012)
SQLKnowItAll (1/16/2012)
insert into test2
values ('18','0014','01234567125','','9@test.co.uk')
insert into test2
values ('19','0014','01234567126','','9@test.co.uk')
Then this is 1 unique landline?
You have this:
insert into test2
values ('18','0014','01234567126','','9@test.co.uk')
insert into test2
values ('19','0014','01234567126','','9@test.co.uk')
This is 1 unique landline?
You have...
January 16, 2012 at 3:41 pm
Can you give this a whirl please Bicky, using a decent-sized dataset rather than the somewhat diminutive sample data set? Cheers.
DROP TABLE #test2
CREATE TABLE #test2 (indkey NVARCHAR(2),...
January 16, 2012 at 10:57 am
Mark-101232 (1/16/2012)
bicky1980 (1/16/2012)
With ChrisM's help, I think I now have the solution:
CREATE TABLE #test2 (indkey NVARCHAR(2), ...
January 16, 2012 at 10:00 am
SELECT
od.productid,
od.orderid,
so.custid,
so.empid,
od.discount,
od.unitprice, -- what do you see here?
pp.unitprice, -- what do you see here?
od.unitprice - pp.unitprice AS Profit -- does the calculation make sense now?
FROM...
January 16, 2012 at 8:23 am
niha.736 (1/16/2012)
If a table contain no records and if I write the statement as insert in functions and I also written it in the stored procedure, so, what will...
January 16, 2012 at 6:28 am
bicky1980 (1/16/2012)
ChrisM@home (1/13/2012)
bicky1980 (1/13/2012)
Thanks for the reply, if there were 2 duplicate datakeys with different landline values, I would only want this to be counted as one record, as I...
January 16, 2012 at 4:50 am
Viewing 15 posts - 586 through 600 (of 1,229 total)