Viewing 15 posts - 436 through 450 (of 895 total)
raghuldrag (7/27/2012)
=======================================
E2674 apr 3000 00000 -3000
R7890 jun ...
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
July 27, 2012 at 12:45 am
No. There is no way to update the NULL values in the table directly
You will have to write a query manually for all the 26 columns and document it
One option...
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
July 27, 2012 at 12:24 am
raghuldrag (7/26/2012)
(
account varchar(30),
trans char(30),
trans_date date,
amount number(50)
)
insert into report(account,trans,trans_date,amount) values('E2674','Cr','02apr02',300)
insert into report(account,trans,trans_date,amount) values('R7890','Dr','06jun11',5000)
insert into report(account,trans,trans_date,amount) values('E9700','Cr','7feb09',5000).......
insert into report(account,trans,trans_date,amount) values('R7890','Cr','06jun11',5900)
insert into report(account,trans,trans_date,amount) values('E9700','Dr','7feb09',8000)
now i need the output of display...
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
July 27, 2012 at 12:08 am
Welcome to SSC!!
You can try to Google "IDENTITY SQL Server"
I am sure you will get lots of information which can't be provided in a single forum
If you still have any...
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
July 26, 2012 at 6:28 am
raghuldrag (7/25/2012)
when i am using DATEPART() its shows the month number(april,4),But i need the month name..... while i m using DATENAME() function giving the same month number only...
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
July 25, 2012 at 6:38 am
xmozart.ryan (7/25/2012)
dwain.c (7/24/2012)
If you just want to do it as an exercise, that's fine. ...
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
July 25, 2012 at 4:36 am
sankar.nandakumaran (7/25/2012)
Thanks for the code , but here employee master table should contain only one row and emplioyee detail table can contain n...
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
July 25, 2012 at 2:44 am
As Dwain has already said, the hard coding method, though tedious is the best for Production and quite readable
I have presented below the code to do it using Dynamic SQL....
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
July 25, 2012 at 2:30 am
raghuldrag (7/25/2012)
if suppose em calculting 'o1-apr-2011' and '30-apr-2011'..... wanna the data also perivous year of same month.... and display month column separately
I sincerely feel you are wasting time( including yours...
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
July 25, 2012 at 12:41 am
xmozart.ryan (7/23/2012)
Kingston Dhasian (7/23/2012)
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots,...
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
July 24, 2012 at 3:07 am
Do you have any DDL trigger in your database?
If Yes, then check the code and see if it updates any table to which you don't have permission.
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
July 24, 2012 at 2:37 am
Ajdba (7/24/2012)
Thanks so much, but when I am running the query Datepart function is not getting the year from the column which should be 2011
What is the datatype of...
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
July 24, 2012 at 2:33 am
forsqlserver (7/23/2012)
It is giving error:Msg 156,state 1,Line 6
Incorrect syntax near the keyword except.
You are probably using SQL Server 2000
EXCEPT operator works only in SQL Server 2005+
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
July 23, 2012 at 5:32 am
forsqlserver (7/23/2012)
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
July 23, 2012 at 5:31 am
In that case, you can use the LEFT OUTER JOIN, as I had suggested earlier
DELETEa
FROMT1580 a
LEFT OUTER JOINT2115 b ON a.C301289100 = b.C1000000161 AND b.C7 < 5
WHEREb.C1000000161 IS NULL
You said...
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
July 23, 2012 at 5:01 am
Viewing 15 posts - 436 through 450 (of 895 total)