cross query
-
mates, how to come up with tblTemp using programming not sql. or any ideas how to get with tblTemp.
tblItem {ORIGINAL TABLE}
CDATE ITEMCODE ITEMVALUE
2008-12-08 1001 4.5
2008-12-08 1002 7.3
2008-12-08 1003 0.52009-03-25 1001 1.2
2009-03-25 1002 0.3
2009-03-25 1003 3.4tblTemp {I WANT THE RESULT LIKE THIS!}
CDATE 1001 1002 1003
2008-12-08 4.5 7.3 0.5
2009-03-25 1.2 0.3 3.4in access i just use looping with ds.Fields.count - 1 (where ds is Recordset) but how will i do it in asp.net using Dataset not Recordset or something. ( I dont want to use recordset)
C# コードMicrosoft End User 2000-2008 「「「「「「「「「「「「「「「「「「「「「「「「「「「「 The best things in life are free 」」」」」」」」」」」」」」」」」」」」」」」」」」」」
-
mates, how to come up with tblTemp using programming not sql. or any ideas how to get with tblTemp.
tblItem {ORIGINAL TABLE}
CDATE ITEMCODE ITEMVALUE
2008-12-08 1001 4.5
2008-12-08 1002 7.3
2008-12-08 1003 0.52009-03-25 1001 1.2
2009-03-25 1002 0.3
2009-03-25 1003 3.4tblTemp {I WANT THE RESULT LIKE THIS!}
CDATE 1001 1002 1003
2008-12-08 4.5 7.3 0.5
2009-03-25 1.2 0.3 3.4in access i just use looping with ds.Fields.count - 1 (where ds is Recordset) but how will i do it in asp.net using Dataset not Recordset or something. ( I dont want to use recordset)
C# コードMicrosoft End User 2000-2008 「「「「「「「「「「「「「「「「「「「「「「「「「「「「 The best things in life are free 」」」」」」」」」」」」」」」」」」」」」」」」」」」」
C#Coudou wrote:
any ideas how to get with tblTemp
You could try taking him/her to a movie, maybe dinner... see where it goes from there? ;P Seriously, though, I really don't understand your question. Why do you want to do it this way? Why don't you want to use SQL? SQL is infinitely better for querying data - that's what it does. Please explain further?
-
C#Coudou wrote:
any ideas how to get with tblTemp
You could try taking him/her to a movie, maybe dinner... see where it goes from there? ;P Seriously, though, I really don't understand your question. Why do you want to do it this way? Why don't you want to use SQL? SQL is infinitely better for querying data - that's what it does. Please explain further?
GlobX wrote:
Why don't you want to use SQL?
because i want to put in datatable as temptable not in sql, period. and from datatable to gridview. the problem is how will put in datatable.that is the question.
C# コードMicrosoft End User 2000-2008 「「「「「「「「「「「「「「「「「「「「「「「「「「「「 The best things in life are free 」」」」」」」」」」」」」」」」」」」」」」」」」」」」
-
GlobX wrote:
Why don't you want to use SQL?
because i want to put in datatable as temptable not in sql, period. and from datatable to gridview. the problem is how will put in datatable.that is the question.
C# コードMicrosoft End User 2000-2008 「「「「「「「「「「「「「「「「「「「「「「「「「「「「 The best things in life are free 」」」」」」」」」」」」」」」」」」」」」」」」」」」」
-
ooppss. sorry. PROBLEM SOLVED. JUST IN TIME. thanks anyway.
C# コードMicrosoft End User 2000-2008 「「「「「「「「「「「「「「「「「「「「「「「「「「「「 The best things in life are free 」」」」」」」」」」」」」」」」」」」」」」」」」」」」
C#Coudou wrote:
PROBLEM SOLVED. JUST IN TIME. thanks anyway.
Anyway it's better you close this question by posting the solution which you have find(Also clear the question too). Cheers.
thatraja
**My Tip/Tricks
My Dad had a Heart Attack on this day so don't...
** -
mates, how to come up with tblTemp using programming not sql. or any ideas how to get with tblTemp.
tblItem {ORIGINAL TABLE}
CDATE ITEMCODE ITEMVALUE
2008-12-08 1001 4.5
2008-12-08 1002 7.3
2008-12-08 1003 0.52009-03-25 1001 1.2
2009-03-25 1002 0.3
2009-03-25 1003 3.4tblTemp {I WANT THE RESULT LIKE THIS!}
CDATE 1001 1002 1003
2008-12-08 4.5 7.3 0.5
2009-03-25 1.2 0.3 3.4in access i just use looping with ds.Fields.count - 1 (where ds is Recordset) but how will i do it in asp.net using Dataset not Recordset or something. ( I dont want to use recordset)
C# コードMicrosoft End User 2000-2008 「「「「「「「「「「「「「「「「「「「「「「「「「「「「 The best things in life are free 」」」」」」」」」」」」」」」」」」」」」」」」」」」」
Hi, This is called Pivoting of Data. Please have a look over my article: Pivoting DataTable Simplified[^] This can get you a flexible and customized result with a clean code.
Anurag Gandhi.
http://www.gandhisoft.com
Life is a computer program and every one is the programmer of his own life.
My latest article: Group GridView Data -
C#Coudou wrote:
any ideas how to get with tblTemp
You could try taking him/her to a movie, maybe dinner... see where it goes from there? ;P Seriously, though, I really don't understand your question. Why do you want to do it this way? Why don't you want to use SQL? SQL is infinitely better for querying data - that's what it does. Please explain further?
You can create a datatable entirely in code, add the columns to it, and populate it, then just use it as if you had loaded it from a database. Are you using C# or VB? I'll post a sample when I know which language you like. Lisa Z. Morgan