Viewing 15 posts - 661 through 675 (of 2,452 total)
still not sure what are after....thanks for the sample data, would be good if you posted expected results based on that sample..
maybe...??
select REPLACE(p_code,' ',' ') pcode
from Postcode
where
patindex('[A-Z][0-9] ...
May 26, 2016 at 6:36 am
ganapathy.arvindan (5/24/2016)
Code is not clear here..mostly the output sample is not in clear format
when you post you will see at the lefthand side there is list of "IFCode Shortcuts" ...
May 24, 2016 at 3:00 am
you are more likely to get a respone if you post your question here, along with scripts that create tables, insert sample data and the results you expect from...
May 24, 2016 at 2:36 am
b ghanekar (5/18/2016)
The output from your data should be as...
May 20, 2016 at 5:44 pm
when you post you will see at the lefthand side there is list of "IFCode Shortcuts" such as code=sql - /code (in square brackets) ..... if you...
May 20, 2016 at 5:08 pm
randyetheridge (5/20/2016)
May 20, 2016 at 10:58 am
how are you calculating these results....are they supposed to be averages over the period?...or some other process?
End Result
FromDateToDate CADRate USDRateCADExchangeRate
3/31/20164/29/201667.851887.757877.3171
2/29/20163/30/201667.718688.323676.6710
1/31/20162/28/201665.091590.719471.7504
12/31/20151/30/201566.155191.575172.2414
May 20, 2016 at 10:18 am
gave you some dynamic pivot code last week.....can you make use of that?
May 20, 2016 at 4:16 am
yahya-236450 (5/19/2016)
First time they would all be null then we start with Invoice No = 1 for first row that falls under the criteria when the query is run and...
May 19, 2016 at 6:04 pm
bit confused...are you saying that initially every row in Orders table has the InvoiceNo as 'NULL' and then based on a specifc WHERE clause you want an incrementing number?
eg
WHERE ...
May 19, 2016 at 5:02 pm
J Livingston SQL (5/19/2016)
navya8877 (5/19/2016)
Thank a Ton for solving this. This looks perfect. 🙂
have you tested with more than one employee?
INSERT INTO @TimeCard
VALUES
(5, 6665157, 468, 'ENTER', '2016-05-17 08:13:43.000'),
(5, 6665157, 468,...
May 19, 2016 at 11:51 am
navya8877 (5/19/2016)
Thank a Ton for solving this. This looks perfect. 🙂
have you tested with more than one employee?
INSERT INTO @TimeCard
VALUES
(5, 6665157, 468, 'ENTER', '2016-05-17 08:13:43.000'),
(5, 6665157, 468, 'EXITS', '2016-05-17 12:14:49.000'),
(5,...
May 19, 2016 at 10:34 am
b ghanekar (5/18/2016)
Buy Transactions
'M33945','A01022','2011-06-15',3
'M33945','A01022','2011-06-16',5
'M33945','A01022','2011-06-20 ,5
'M33945','A01022','2011-06-22 ,5
Sale Transactions
'M33945','A01022','2011-06-17’,2,'Y'
'M33945','A01022','2011-06-17',4,'Y'
'M33945','A01022','2011-06-17',1,'Y'
'M33945','A01022','2011-06-18',3,'Y'
'M33945','A01022','2013-01-30',5,'Y'
Output desired
M33945, A01022, 2011-06-15, 3, 2011-06-17, 3 N
M33945, A01022, 2011-06-16, 4, 2011-06-17, 4 N
M33945, A01022, 2011-06-16, 1, 2011-06-18, 1...
May 18, 2016 at 3:58 pm
Lynn Pettis (5/18/2016)
J Livingston SQL (5/18/2016)
Lynn Pettis (5/18/2016)
Grumpy DBA (5/18/2016)
jasona.work (5/18/2016)
Brandie Tarvin (5/18/2016)
May 18, 2016 at 12:46 pm
Lynn Pettis (5/18/2016)
Grumpy DBA (5/18/2016)
jasona.work (5/18/2016)
Brandie Tarvin (5/18/2016)
May 18, 2016 at 12:32 pm
Viewing 15 posts - 661 through 675 (of 2,452 total)