As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am Oracle guy with no experience in SQL Server and have been hired to make ERDs/DDLs for a job in SQL Server. I've finished the ERD and have presented DDL statements, but am now additionally being requested to do application logic as well. I enjoy doing application logic in PL/SQL and figure it won't be so hard for me to translate the logic into TSQL procs without much studying. Is this an accurate belief?
I know absolutely no TSQL.
TSQL is not difficult to learn. You should be up to speed in a day if you are serious about it. Just learn the basics and then the differences. Pick up some tutorials on the internet and do some practices.
You can pay attention to these and more
Conditional statement - IF, Loops
Cursors
Variable declaration
Assignment statement
Stored Procedures
Functions
and more
Like you could do a comprehensive search - TSQL vs PL/SQL, or Differences between PL/SQL and TSQL
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Where ever I read I see experts writing to stay away from typed datasets and use the entity framework or similar.
On the other hand almost every ado.net book I read will show first how to use datasets and some of them only use datasets, that gives me the impression that its not bad. if it is why teach it for the new programers?
All depends on what you want to do with the data you're pulling from your DB.
I use a DataSet to load data in to a Crystal Report because it plays well together. Anywhere else in my app i use mostly anonymous types. Either way i use the EntityFramework to pull the data from my DB. I get results much faster that way than using ADO.NET and DataSets. If i need raw performance I use ADO.NET. For batch updates for example.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
If I want to use a traditional approval type workflow in a regular asp.net system, for example
an order that needs an approval before order is placed. Rather than having the traditional
enum for OrderStatus, can I benefit from using microsoft WF4 (Workflow version 4) for this
or will I just generate more complexity and more code for no added benefit?
Any time you have a long running operation like this WF4 is a good possibility. The fact that the graphical designer allows you to show the actual running process, not a Visio copy of it, is also a huge benefit.
There is however a learning curve to WF4 and there are times you have to do things the WF4 way instead of the C#/VB way you did before. That said there is certainly a benefit, thinks like an approval request not being handled in, lets say, 14 days is very easy to do in WF4.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Are there significant performance issues when using nested(2 level deep at max) queries in PostgreSQL?
I use version 8.4.2
I am asking because I am planning to use quite a lot of those soon on a busy website..
The boring answer: it depends on the query and your data.
To write (and read and understand) a nested query might be easier than writing a non-nested one, but you might end up paying the price in reduced performance. During my previous database project we ended up rewriting quite a few of the more critical queries to avoid nesting and we saw order of magnitude performance improvements.
EXPLAIN is your friend. You should learn to love it and how to use it :)
http://www.postgresql.org/docs/current/static/sql-explain.html
Not really.
If you want to improve, does not forget to runs analyze on all tables periodically.
Your question is waaaaaaaaaaaaaaaaaaaaaaay too general. There isn't any inherent issue with using "nested" queries in Postgres, no matter how many levels deep. You need to post specific queries if you have issues.
Additionally...if you're designing a new system, then why 8.4 and not 9.0? And even on 8.4, you should update to 8.4.5.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Does anyone know of a real good SSMS Add-In that beautifies T/SQL, isn't too expensive and also does things around best practices for T/SQL formatting?
I'm well aware of Red Gate's tool, but ~$300 is quite a killer amount.
http://www.red-gate.com/products/SQL_Refactor/index.htm
I've seen this Add-In, but it's purely about indentation.
http://www.wangz.net/sqlpp/ssmsaddin.html
Neither solution addresses the commenting and header best practices.
I came across this tool:
http://www.apexsql.com/sql_tools_refactor.asp
It's pretty good for a free product. Nothing beats the Red Gate tools however.
Have you tried SQL Enlight?
These ones have some basic features
http://www.sqlinform.com/free_online_sw.html
http://www.dpriver.com/pp/sqlformat.htm
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Is there a good tutorial or something similar for learning how to write Stored Procedures (for a PostgreSQL database). I'm a definite newbie when it comes to writing Stored Procedures at all, so the clearer and simpler things are explained, the better...
Thanks in advance...
You almost had it, but better start here plpgsql
Some will point that PL/pgSQL is not the only way to write Stored Procedures for PostgreSQL and they will be right (that's one of the advantages of Postgres), but on the other hand PL/pgSQL is nice and relatively easy to start with.
Note that obviously, here's a good place to start:sql-createfunction