Viewing 15 posts - 121 through 135 (of 761 total)
yuvipoy (12/26/2012)
i am having two tables one table is having header details and another is having data
Table_idCol_1Col_2 Col_3Col_4 Col_5Col_6
1Mytab_1_1NULL Mytab_1_2NULL Mytab_1_3 ...
December 28, 2012 at 2:10 am
Is this what you are looking for?
--Creating Tables
Create Table Store_Audit_Type
(
Audit_Type_Id Int,
Audit_Type_Description NVarchar(30)
)
Create Table Store_Audit_Details
(
StoreId Int,
Audit_Type_Id Int,
CreatedDate Date
)
--Inserting Sample Data...
December 28, 2012 at 1:56 am
Bhuvnesh (12/26/2012)
vinu512 (12/24/2012)
Select Char(34) + Char(67) + Char(72) + Char(69) + Char(69) + Char(82) + Char(83)+ ' ' + Char(68) + Char(87) + Char(65) + Char(73) +...
December 26, 2012 at 9:34 pm
Sean Lange (12/21/2012)
Here is one way to do this.
select * from #temp
where cCurrentGradeCode...
December 26, 2012 at 4:37 am
hemal_301080 (12/26/2012)
🙂Thank Vinu Vijayan
No probs Hemal....it was my bad.
December 26, 2012 at 4:14 am
I'm sorry Hemal, there is a slight error in my query. If there is data for more than one year then the data would be grouped only according to month...
December 26, 2012 at 3:46 am
hemal_301080 (12/26/2012)
Thanks, this worked
You're Welcome!! 🙂
Anytime Lokesh. It was just a matter of Grouping the data before joining.
December 26, 2012 at 3:34 am
This would do what you are looking for:
Select p.Month, SUM(p.cramount) As Credit, SUM(q.dramount) As Debit From
(
Select b.voucherno, DATENAME(MM, a.dt) As Month, SUM(b.cramount) As cramount From voucher As a...
December 26, 2012 at 2:32 am
There are 3 tables which are: 1. a claims table by client number that has the duplicate data wtihin some of the rows. 2. a price table and 3. an...
December 26, 2012 at 12:14 am
Happy Holidays to you too Steve..........I guess the others have already started.....anyways wishing everyone a Merry Christmas and a Happpy New Year!!!!!! 🙂
December 25, 2012 at 9:33 pm
dwain.c (12/24/2012)
vinu512 (12/24/2012)
dwain.c (12/24/2012)
vinu512 (12/20/2012)
dwain.c (12/20/2012)
vinu512 (12/20/2012)
dwain.c (12/19/2012)
Since quote is also CHAR(25), you can also do this:CHARINDEX(CHAR(25), string_column) > 0
Single Quote is char(39) Dwain......if I am not wrong. 😉
Looked like...
December 24, 2012 at 3:28 am
dwain.c (12/24/2012)
vinu512 (12/20/2012)
dwain.c (12/20/2012)
vinu512 (12/20/2012)
dwain.c (12/19/2012)
Since quote is also CHAR(25), you can also do this:CHARINDEX(CHAR(25), string_column) > 0
Single Quote is char(39) Dwain......if I am not wrong. 😉
Looked like a single...
December 24, 2012 at 2:33 am
Lidou123 (12/20/2012)
thank U for your answer !!!
I tested the script but I have an error !!! it is in french .
Msg 116, Niveau 16, État 1, Ligne 8
Une seule expression peut être spécifiée...
December 20, 2012 at 11:01 pm
Melanie Peterson (12/20/2012)
Thank you, Vinu! The EXCEPT statement is new to me. Always nice to learn something new.
Yes it is always good to learn something new Melanie.
And what is...
December 20, 2012 at 10:23 pm
dwain.c (12/20/2012)
vinu512 (12/20/2012)
dwain.c (12/19/2012)
Since quote is also CHAR(25), you can also do this:CHARINDEX(CHAR(25), string_column) > 0
Single Quote is char(39) Dwain......if I am not wrong. 😉
Looked like a single quote when...
December 20, 2012 at 10:19 pm
Viewing 15 posts - 121 through 135 (of 761 total)