Originally posted by suityou01
View Post
- 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!
Bob update
Collapse
X
Collapse
-
According to the wikipedia page that just told me what PL/SQL was, PL/SQL and Oracle SQL are two different languages, among three that Oracle supports natively. I presume "Oracle SQL" is what I would regard as SQL. -
Reminds me of a website I found while doing a government contract. You can see how bored I was;Originally posted by pacharan View PostThis app you're writing, it's not for Granada Service Stations by any chance is it?
Granada - Motorway Services Online
Amazing that someone can actually make a website with the look and feel of a 1970s motorway services.And what exactly is wrong with an "ad hominem" argument? Dodgy Agent, 16-5-2014Comment
-
I worked on that!Originally posted by Mich the Tester View PostReminds me of a website I found while doing a government contract. You can see how bored I was;
Granada - Motorway Services Online
Amazing that someone can actually make a website with the look and feel of a 1970s motorway services.
Did you know that if you click on certain elements on the home page in a certain sequence it brings up a page showing cheats for all the fruitees installed at Granada service stations.
Need a lot of positive rep before I reveal details of that
Comment
-
Oracle isn't ANSI, though.Originally posted by suityou01 View PostI was always lead to believe that Oracle (ANSI) SQL was the pure form and Microsoft created their own variant. A bit like javascript vs MS Javascript.
Sounds plausible. The panel think what?
Oracle only introduced the ANSI join syntax with 9i, for example.Comment
-
When you mentioned cursors I actually thought you were on to some really complex engineering problem. For a problem as trivial as that I am amazed you went for a cursor.Originally posted by suityou01 View PostOK so this is the example where the cursor is being used :
The screen in question creates a row in a table called dinner. There is a child table called dinner_item which will hold all of the dinner items.
In the meta data we define for each type of dinner, what the default set of dinner items are.
So for cooked breakfast we have :
Fried tomato
Bacon
Beans
Sausage
Mushrooms
So when we create a dinner row, we want to automajically populate the dinner items from the meta data. So the cursor would open the list of dinner_items from the meta data, and then pop one row in the dinner_item table.
It could be done from the application layer, but this would not only perform better but would be easier to change the stored procedure than rush out a new version of the app.
The stored procedure debate trundles on, but we were forced into using stored procs as Oracle doesn't have an identity field, so we need to use sequences so this is all wrapped up in the insert stored proc, and the new id value returned as an output variable.
Assuming this is your table structure
Dinner
----------
DinnerId int
DinnerName nvarchar(50)
DinnerItem
----------
DinnerItemId int
ItemName nvarchar(50)
DinnerId
DinnerItemMetaData
--------------
Id int
ItemName nvarchar(50)
Why cant you just do this ?
DECLARE @DinnerId int
INSERT INTO Dinner(DinnerName) VALUES('SuitYous Dinner')
SELECT @DinnerId = @@Identity
INSERT INTO DinnerItem(ItemName,DInnerId)
SELECT ItemName, @DinnerId FROM DinnerItemMetaDataVote Corbyn ! Save this country !Comment
-
Originally posted by fullyautomatix View PostWhen you mentioned cursors I actually thought you were on to some really complex engineering problem. For a problem as trivial as that I am amazed you went for a cursor.
Assuming this is your table structure
Dinner
----------
DinnerId int
DinnerName nvarchar(50)
DinnerItem
----------
DinnerItemId int
ItemName nvarchar(50)
DinnerId
DinnerItemMetaData
--------------
Id int
ItemName nvarchar(50)
Why cant you just do this ?
DECLARE @DinnerId int
INSERT INTO Dinner(DinnerName) VALUES('SuitYous Dinner')
SELECT @DinnerId = @@Identity
INSERT INTO DinnerItem(ItemName,DInnerId)
SELECT ItemName, @DinnerId FROM DinnerItemMetaData



Top work. Made my evening that. Stick to mopping out the bogs mate.
What a complete tit.
Knock first as I might be balancing my chakras.Comment
-
Because it's Oracle dumbo.Originally posted by fullyautomatix View PostWhen you mentioned cursors I actually thought you were on to some really complex engineering problem. For a problem as trivial as that I am amazed you went for a cursor.
Assuming this is your table structure
Dinner
----------
DinnerId int
DinnerName nvarchar(50)
DinnerItem
----------
DinnerItemId int
ItemName nvarchar(50)
DinnerId
DinnerItemMetaData
--------------
Id int
ItemName nvarchar(50)
Why cant you just do this ?
DECLARE @DinnerId int
INSERT INTO Dinner(DinnerName) VALUES('SuitYous Dinner')
SELECT @DinnerId = @@Identity
INSERT INTO DinnerItem(ItemName,DInnerId)
SELECT ItemName, @DinnerId FROM DinnerItemMetaData
To insert a row you need sequences, implicit cursors, ref cursor for the ID etc.
Jeez, ever wondered why an Oracle licence costs like £5bn per server?
Comment
-
He posted earlier in the thread. Just obviously doesn't follow theOriginally posted by DimPrawn View PostBecause it's Oracle dumbo.
To insert a row you need sequences, implicit cursors, ref cursor for the ID etc.
Jeez, ever wondered why an Oracle licence costs like £5bn per server?

- Read the thread
- Think before typing
- Now post
Rule of thumb

Knock first as I might be balancing my chakras.Comment
-
Mmmm. I wonder what I'd been doing wrong. Thanks for the first two steps.Originally posted by suityou01 View PostHe posted earlier in the thread. Just obviously doesn't follow the
- Read the thread
- Think before typing
- Now post
Rule of thumb


Oh, yes. Chutney.What happens in General, stays in General.You know what they say about assumptions!Comment
-
Cut him some slack - he's obviously been on the mushrooms.Originally posted by DimPrawn View PostBecause it's Oracle dumbo.
To insert a row you need sequences, implicit cursors, ref cursor for the ID etc.
Jeez, ever wondered why an Oracle licence costs like £5bn per server?


You probably want to be using SCOPE_IDENTITY anyway (assuming you change your db strategy and go with SQL Server).+50 Xeno Geek Points
Come back Toolpusher, scotspine, Voodooflux.Pogle
As for the rest of you - DILLIGAF
Purveyor of fine quality smut since 2005
CUK Olympic University Challenge Champions 2010/2012
Comment
- 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

Comment