Jun 16th, 2008, 01:21 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] SQl problem
hi all im using this code, and it is working very fine and my reports shows the expected result
Code:
If cmb.ListIndex = 1 Then
Set rs = con.Execute("select marks from StuMarks where srollno=21")
Set DataReport1.DataSource = rs
DataReport1.Show
End If
but i have to change the to this one
Code:
Set rs = con.Execute("select MAX(marks) from StuMarks where srollno=21")
this is not working i get an error when report opens.
Data field 'marks' not found
but same SQL works without MAX function
please solve this
Jun 16th, 2008, 01:22 PM
#2
Re: SQl problem
Try...
Code:
Set rs = con.Execute("select MAX(marks) AS marks from StuMarks where srollno=21")
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Jun 16th, 2008, 01:24 PM
#3
Thread Starter
Fanatic Member
Re: SQl problem
Great
thank you so much Rob
Jun 16th, 2008, 01:26 PM
#4
Re: [RESOLVED] SQl problem
No prob. Glad to help
Ps, sorry for the delay
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Jun 16th, 2008, 01:28 PM
#5
Thread Starter
Fanatic Member
Re: [RESOLVED] SQl problem
hehehe
there was no delay, you replied this and solved this problem within One minute
Jun 16th, 2008, 01:30 PM
#6
Re: [RESOLVED] SQl problem
I know, was making fun at the instant response.
Oh and btw the error was because when you use a calculation function like that it will change the field name as a result of its calculation like "MaxOfmarks" or such. So by aliasing it back to the original it will be found.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Jun 16th, 2008, 01:32 PM
#7
Thread Starter
Fanatic Member
Re: [RESOLVED] SQl problem
yeah thats y i wrote hehehe in my previous post. please now don't make this thread up
Jun 16th, 2008, 01:36 PM
#8
Thread Starter
Fanatic Member
Re: [RESOLVED] SQl problem
oh please I'm sorry
please tell me whats wrong in this query
Code:
Set rs = con.Execute("select name, MAX(marks) AS marks from StuMarks where srollno=21")
Jun 16th, 2008, 01:44 PM
#9
Re: [RESOLVED] SQl problem
Well when you use an aggrete function like MAX any other fields you include in the select list need to either be having some other aggrete function applied to it or just be included in a GROUP BY clause at the end of the query.
Code:
Set rs = con.Execute("select [name], MAX(marks) AS marks from StuMarks where srollno=21 GROUP BY [name]")
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Jun 16th, 2008, 01:49 PM
#10
Thread Starter
Fanatic Member
Re: [RESOLVED] SQl problem
my actual query is
Code:
Set rs = con.Execute("select [rollno], MAX(markoptained) as markoptained from markccc WHERE [session]= " & Text1.Text & "")
and i get this error
Code:
you tried to execute a query that does not include the specified expression ' rollno' as part of an aggregate function
Jun 16th, 2008, 01:50 PM
#11
Re: [RESOLVED] SQl problem
Yup and you didnt add the rest of what I had wrote about the GROUP BY clause
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Jun 16th, 2008, 02:09 PM
#12
Thread Starter
Fanatic Member
Re: [RESOLVED] SQl problem
can u pls tell me what to do next in this query?
Jun 16th, 2008, 02:15 PM
#13
Thread Starter
Fanatic Member
Re: [RESOLVED] SQl problem
it is showing now two records Rob
and i want to show only one record
Code:
Set rs = con.Execute("select [rollno], MAX(markoptained) as markoptained from markccc WHERE [session]= " & Text1.Text & " Group by rollno")
Jun 16th, 2008, 02:18 PM
#14
Re: [RESOLVED] SQl problem
Is "rollno" unique between the two or are they the same. Can you post some example record data?
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Jun 16th, 2008, 02:30 PM
#15
Thread Starter
Fanatic Member
Re: [RESOLVED] SQl problem
i have wrote the whole code in my #1 post
and my table have only these three fields only
rollno
markoptained
session
Jun 16th, 2008, 02:34 PM
#16
Re: [RESOLVED] SQl problem
But you are not adding the extra fields to your select list as I have been mentioning like in post #9.
For your other fields it would look like this.
Code:
Set rs = con.Execute("select rollno, markoptained, session, MAX(marks) AS marks from StuMarks where srollno=21 GROUP BY rollno, markoptained, session")
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Jun 16th, 2008, 02:50 PM
#17
Thread Starter
Fanatic Member
Re: [RESOLVED] SQl problem
it is still showing me Two Records Rob
Code:
Set rs = con.Execute("select rollno, markoptained, [session], MAX(markoptained) AS markoptained from markccc where [session]= " & Text1.Text & " GROUP BY rollno, markoptained, [session]")
Jun 16th, 2008, 02:52 PM
#18
Thread Starter
Fanatic Member
Re: [RESOLVED] SQl problem
not only two records,
it is showing all the records which fulfils the criteria
Jun 16th, 2008, 03:00 PM
#19
Re: [RESOLVED] SQl problem
Well Im not sure what the reason is as I cant see your resulting data. If its sensitive just post a relevant mock up. the query is right but without the data it is not known if its possible at all.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Jun 16th, 2008, 11:07 PM
#20
Thread Starter
Fanatic Member
Re: [RESOLVED] SQl problem
Rob,
im upload the example, please click the button Report. when you run this example.
i want only one record (MAX marks) to be shown but it is showing all the records
Attached Files
Jun 16th, 2008, 11:25 PM
#21
Re: [RESOLVED] SQl problem
Ok since you have the rollno field in there it is creating the multiple records because it cant be grouped by because there are no common values to group on. How are you going to group "4, 5, 7, 8"?
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Jun 16th, 2008, 11:30 PM
#22
Thread Starter
Fanatic Member
Re: [RESOLVED] SQl problem
i just want to show the MAX marks and the rollno of its row.
this is the requirement
Jun 16th, 2008, 11:31 PM
#23
Re: [RESOLVED] SQl problem
Im not sure what your rollno field is used for but if you have to show it you can show just the FIRST or LAST value as those are aggregete functions.
This will give you one record as I think you may need.
Code:
Set rs = con.Execute("select FIRST(rollno) AS rollno, MAX(markoptained) AS markoptained from markccc where [session]= " & Text1.Text)
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Jun 16th, 2008, 11:33 PM
#24
Re: [RESOLVED] SQl problem
Originally Posted by
chunk
i just want to show the MAX marks and the rollno of its row.
this is the requirement
You can not show just one row with the rollno field as I have previously posted the values in that field are not all the same so there is nothing to group them by when MAX the other field.
What is it supossed to look like?
4 - 425
5 - 425
7 - 425
8 - 425
????
You can not do that with a single sql call.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Jun 16th, 2008, 11:38 PM
#25
Thread Starter
Fanatic Member
Re: [RESOLVED] SQl problem
now this problem is solved.
hehehe
Thank you so much Rob
Jun 16th, 2008, 11:44 PM
#26
Thread Starter
Fanatic Member
Re: [RESOLVED] SQl problem
no not working,
RollNo is not coming of the particular Row.
Jun 16th, 2008, 11:56 PM
#27
Re: [RESOLVED] SQl problem
Can you please post exactly how the record should look? Only you know how you are needing it.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Jun 17th, 2008, 12:01 AM
#28
Thread Starter
Fanatic Member
Re: [RESOLVED] SQl problem
i want to show the Tooper(S) marks of Student in the report and his Roll No. only
Jun 17th, 2008, 12:04 AM
#29
Re: [RESOLVED] SQl problem
What does that mean? Can you just post how the complete data should look?
Code:
rollno | markoptained
----------------------
4 425
Something like that.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Jun 17th, 2008, 12:16 AM
#30
Thread Starter
Fanatic Member
Re: [RESOLVED] SQl problem
rollno markoptained session
4 299 201
5 395 201
6 465 205
7 380 201
8 258 201
this is how data is saved in the table, the highest marks are 465. and output should be like
rollno | markoptained
----------------------
6 465
because corrosponding rollno is 6
Jun 17th, 2008, 12:20 AM
#31
Re: [RESOLVED] SQl problem
It would be best if you learned other features of SQL yourself. http://sqlzoo.net/
Jun 17th, 2008, 12:29 AM
#32
Re: [RESOLVED] SQl problem
Ok, then that is easier as we can simply sort the table in descending order and limit its return to a single record which will be the maximum value for markoptianed.
Code:
Set rs = con.Execute("SELECT TOP 1 rollno, markoptained from markccc ORDER BY markoptained DESC")
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Jun 17th, 2008, 12:30 AM
#33
Re: [RESOLVED] SQl problem
Originally Posted by
leinad31
Most of it is just getting the communications correct. Having an example of how you want/need the results show alot more then one would think.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Jun 17th, 2008, 12:40 AM
#34
Re: [RESOLVED] SQl problem
Originally Posted by
RobDog888
Most of it is just getting the communications correct. Having an example of how you want/need the results show alot more then one would think.
For one problem, yes. But in the long run I lean towards "experience is the best teacher" mentality... examples are harder to understand without knowledge of the fundamentals, e.g. discussion on GROUP BY above.
Jun 17th, 2008, 12:43 AM
#35
Re: [RESOLVED] SQl problem
Well without going off topic, we can help best by showing them the correct path instead of posting a generic link and have them be totally lost.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Jun 17th, 2008, 12:49 AM
#36
Re: [RESOLVED] SQl problem
Originally Posted by
RobDog888
Well without going off topic, we can help best by showing them the correct path instead of posting a generic link and have them be totally lost.
I trust in his ability to decide which of the topics covered are relevant to his immediate and future needs.
Jun 17th, 2008, 01:27 AM
#37
Thread Starter
Fanatic Member
Re: [RESOLVED] SQl problem
now this is completly Resolved Rob
Jun 17th, 2008, 11:55 AM
#38
Thread Starter
Fanatic Member
Re: [RESOLVED] SQl problem
Rob i'm so sorry,
actully im too much disturb these days because i lost my girl friend, and she is going to marry some other guy, and my mind is not working properly. please forgive me because im making this thread up again
please tell me what should be done in SQL, if there are two or more student who has same Top marks.
Jun 17th, 2008, 07:06 PM
#39
Re: [RESOLVED] SQl problem
Originally Posted by
chunk
please tell me what should be done in SQL, if there are two or more student who has same Top marks.
Largely depends on how you phrased your SQL, what you want to accomplish, and how your tables are structured... it's possible to return the tied records, its also possible to return just one (without going into technical details, just imagine that choice of record is up to the database), it may return an error in some joins or produce a cartesian result...
So you see, rather than asking for help for each and every query, step back and familiarize yourself with the fundamentals.
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width