oh yeah absolutley no qualms about it
I only really use it to generate a query I then thrown into report builder 2 to create an .rdl file so the user can run the query to their hearts content.
I am not a developer so only really do this sort of stuff as a side line!
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Reply to: Sql server 2008 idiosyncrasy
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "Sql server 2008 idiosyncrasy"
Collapse
-
Originally posted by original PM View PostIf you are a bit of an SQL noob (like me) it is often easier to use the design query in editor option
You do realise you're shooting yourself in the foot using that and its obvious to anyone else how you generated the SQL.
Leave a comment:
-
If you are a bit of an SQL noob (like me) it is often easier to use the design query in editor option
then you can select exactly the fields you want from each table in the order you want - also you can get the joins sorted by just dragging a line between the primary key on the relevant tables..
and also easy to set parameters and other things
never managed to get my head around grouping yet though.
Leave a comment:
-
Correct, but if the order of the columns is important you should really specify each by name.Originally posted by PerlOfWisdom View PostThe reason for using it would be to see the whole table but with the field of interest on the left. This would never be used programatically.
As others have suggested.
Leave a comment:
-
It causes a performance degradation from the start. * is shorthand for 'look up what the table cols are in the system tables'.Originally posted by jmo21 View PostUsing * can also cause a creep in performance degradation as more columns get added to a table over time.
Leave a comment:
-
Using * can also cause a creep in performance degradation as more columns get added to a table over time.
Leave a comment:
-
The reason for using it would be to see the whole table but with the field of interest on the left. This would never be used programatically.Originally posted by kandr View PostThe SELECT LogId is redundant as you are doing a SELECT *.
Leave a comment:
-
problem with using select * is that if anything changes to the table you're selecting from then your SQL is still valid when it should more than likely be invalid.Originally posted by VectraMan View PostSurely there's nothing wrong with the "select *". It's using select * and a column by name that doesn't make any sense and shouldn't suprise anyone that the behaviour might vary. Even I know that with my very limited SQL ability.
Leave a comment:
-
The SELECT LogId is redundant as you are doing a SELECT *.Originally posted by fullyautomatix View PostThis SQL works in SQL 2000
SELECT LogId, * FROM Logs
Order by LogId DESC
This fails in SQL 2008 with the error message
Ambiguous column name 'LogId'.
How ridiculous ? Luckily not affected too much but this could have easily meant a big migration headache.
Leave a comment:
-
Surely there's nothing wrong with the "select *". It's using select * and a column by name that doesn't make any sense and shouldn't suprise anyone that the behaviour might vary. Even I know that with my very limited SQL ability.Originally posted by Spacecadet View PostThis is another reason why "select *" should NOT be used anywhere near production! Microsoft themselves advise against it.
Leave a comment:
-
It doesOriginally posted by lilelvis2000 View PostAssuming that does work T-SQL.
This is another reason why "select *" should NOT be used anywhere near production! Microsoft themselves advise against it.Originally posted by fullyautomatix View PostThis SQL works in SQL 2000
SELECT LogId, * FROM Logs
Order by LogId DESC
This fails in SQL 2008 with the error message
Ambiguous column name 'LogId'.
How ridiculous ? Luckily not affected too much but this could have easily meant a big migration headache.
Leave a comment:
-
Correct. Either alias the column or use Orderby 1 descOriginally posted by PerlOfWisdom View PostYou're selecting [LogID] twice (once in the *) so it doesn't know which one to sort by.
Assuming that does work T-SQL.
Leave a comment:
-
You're selecting [LogID] twice (once in the *) so it doesn't know which one to sort by.Originally posted by fullyautomatix View PostThis SQL works in SQL 2000
SELECT LogId, * FROM Logs
Order by LogId DESC
This fails in SQL 2008 with the error message
Ambiguous column name 'LogId'.
How ridiculous ? Luckily not affected too much but this could have easily meant a big migration headache.
Leave a comment:
-
Sql server 2008 idiosyncrasy
This SQL works in SQL 2000
SELECT LogId, * FROM Logs
Order by LogId DESC
This fails in SQL 2008 with the error message
Ambiguous column name 'LogId'.
How ridiculous ? Luckily not affected too much but this could have easily meant a big migration headache.Tags: None
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- New UK crypto rules now apply. Here’s how mandatory reporting affects contractors Today 07:03
- What the Ray McCann Loan Charge Review means for contractors Yesterday 06:21
- IT contractor demand defied seasonal slump in December 2025 Jan 13 07:10
- Five tax return hacks for contractors as Jan 31st looms Jan 12 07:45
- How to land a temporary technology job in 2026 Jan 9 07:01
- Spring Forecast 2026 ‘won’t put up taxes on contractors’ Jan 8 07:26
- Six things coming to contractors in 2026: a year of change, caution and (maybe) opportunity Jan 7 06:24
- Umbrella companies, beware JSL tunnel vision now that the Employment Rights Act is law Jan 6 06:11
- 26 predictions for UK IT contracting in 2026 Jan 5 07:17
- How salary sacrifice pension changes will hit contractors Dec 24 07:48

Leave a comment: