Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


T-Sql rant


T-Sql rant

Author
Message
foxjazzG
foxjazzG
SSC-Enthusiastic
SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)

Group: General Forum Members
Points: 159 Visits: 317
Why couldn't they write t-sql more like C# or have a flavored compiler for t-sql so that we could work it like c# or vb depending on how you like it. (or the t-sql language which really is the worst language MS has ever put on the block). I really don't understand why the sql server group didn't do a better job of it, or is it because they were taking thier queue from ORACLE.

Really stupid paradigm if you ask me, and I think it needs to be improved upon.
John Rowan
John Rowan
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4072 Visits: 4510
As it stands, T-SQL is about the most simple language on the planet. Specifically, what problems are you having that you feel are the languages fault?

John Rowan

======================================================
======================================================
Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
Lynn Pettis
Lynn Pettis
SSC-Insane
SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)

Group: General Forum Members
Points: 24167 Visits: 37930
So, what don't you like about T-SQL? I find it quite easy to work with and haven't had any problem moving from a 3GL language (COBOL) to it.

The paradigm behind SQL (T-SQL) is completely different from working with a 3GL language but make total sense when working in a set oriented environment.

Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Steve Jones
Steve Jones
SSC-Dedicated
SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)

Group: Administrators
Points: 36024 Visits: 18732
T-SQL comes from SQL. It was developed by Sybase, not MS. It's similar to PL-SQL, which Oracle uses, but there are substantial differences.

A query language, working with sets of data, is fundamentally different than a programming languages like C#.

There are plenty of developers who think C# is a beast and a POS compared to other things. It's likely a preference thing. Each of us probably works with different types of languages and paradigms in different ways and prefers some.

I, like the others, would be interested to know what specific issues you have.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
GSquared
GSquared
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14371 Visits: 9729
OO Querying... what would it look like:

Create Object qqMyQuery as Query;
qqMyQuery.addtable.Table1;
qqMyQuery.addtable.Table2;
qqMyQuery.addtable.Table3;
qqMyQuery.tables.addjoin(Type="Inner","Table1,Table2");
qqMyQuery.tables.joins.addcriteria(Table1.Col1,Table2.Col2);

And so on. Is something like that what you're looking for? Where you'd create objects based on definitions, and then would have to access methods and assign properties?

Frankly, I don't think that works so well. If you really want to try it out, download the free trial of Cache. It's an OO DB. Instead of tables and columns, it has objects and properties. You can do things like "MyTable.Col1.value=1", instead of the T-SQL "update MyTable set Col1 = 1". Data storage is all multi-dimensional arrays. It's designed to work with .NET directly.

If you don't like SQL, try it. Seriously.

Personally, I've done so, and I'm sticking with SQL, for the simple reason that it's a LOT easier to build and operate a database in it. For me, anyway.

- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
foxjazzG
foxjazzG
SSC-Enthusiastic
SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)

Group: General Forum Members
Points: 159 Visits: 317
are you guys living in the cage of t-sql? Smile))

well begin and end for one can be replace with { }

declare @whatever as int can be replace with
int @whatever

gee I just shortened it by two whole words.

set @i = 1 can be replaced by @i = 1 (which it has in sql 2008) about freaken time.

Shall I go on, or can you get the idea?
foxjazzG
foxjazzG
SSC-Enthusiastic
SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)

Group: General Forum Members
Points: 159 Visits: 317
also instead of using cursurs like they are now, wouldn't it be easier to say:

foreach( select myfield from tbl where myotherfield > 3)
{
insert into myothertable (myotherfield) values (myfield)
}

I think it would be easier if this were the case. No GSquared, I like t-sql, but I think it could easily be made a lot more powerful if the t-sql guys would have just get off their asses and did something significant.
Lynn Pettis
Lynn Pettis
SSC-Insane
SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)

Group: General Forum Members
Points: 24167 Visits: 37930
Your complaints are a bit of the mark IMHO. There is nothing wrong with the sematics of T-SQL. It's just different the C# just like C# is different from VB.NET or any of the other varied languages that exist in the world.

Now, what really bothers you about SQL?

Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Lowell
Lowell
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14933 Visits: 38926
the only things you identified so far is a slight shortening of a couple of keywords....saving a handful of keystrokes doesn't mean that's an improvement, just a preference.

Lowell

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Lynn Pettis
Lynn Pettis
SSC-Insane
SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)

Group: General Forum Members
Points: 24167 Visits: 37930
foxjazz (3/13/2009)
also instead of using cursurs like they are now, wouldn't it be easier to say:

foreach( select myfield from tbl where myotherfield > 3)
{
insert into myothertable (myotherfield) values (myfield)
}

I think it would be easier if this were the case. No GSquared, I like t-sql, but I think it could easily be made a lot more powerful if the t-sql guys would have just get off their asses and did something significant.


Most of us SQL guys (and gals) don't use cursors to update tables. That is SO RBAR and inefficient in SQL Server.

Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search