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:
-
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:
-
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:
-
Originally posted by kandr View PostThe SELECT LogId is redundant as you are doing a SELECT *.
Leave a comment:
-
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:
-
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:
-
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:
-
Originally posted by lilelvis2000 View PostAssuming that does work T-SQL.
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:
-
Originally 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:
-
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
- Streamline Your Retirement with iSIPP: A Solution for Contractor Pensions Sep 1 09:13
- Making the most of pension lump sums: overview for contractors Sep 1 08:36
- Umbrella company tribunal cases are opening up; are your wages subject to unlawful deductions, too? Aug 31 08:38
- Contractors, relabelling 'labour' as 'services' to appear 'fully contracted out' won't dupe IR35 inspectors Aug 31 08:30
- How often does HMRC check tax returns? Aug 30 08:27
- Work-life balance as an IT contractor: 5 top tips from a tech recruiter Aug 30 08:20
- Autumn Statement 2023 tipped to prioritise mental health, in a boost for UK workplaces Aug 29 08:33
- Final reminder for contractors to respond to the umbrella consultation (closing today) Aug 29 08:09
- Top 5 most in demand cyber security contract roles Aug 25 08:38
- Changes to the right to request flexible working are incoming, but how will contractors be affected? Aug 24 08:25
Leave a comment: