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
Contractor Services
CUK News
- Business expenses: What IT contractors can and cannot claim from HMRC Jan 30 08:44
- April’s umbrella PAYE risk: how contractors’ end-clients are prepping Jan 29 05:45
- How EV tax changes of 2025-2028 add up for contractor limited company directors Jan 28 08:11
- Under the terms he was shackled by, Ray McCann’s Loan Charge Review probably is a fair resolution Jan 27 08:41
- Contractors, a £25million crackdown on rogue company directors is coming Jan 26 05:02
- How to run a contractor limited company — efficiently. Part one: software Jan 22 23:31
- Forget February as an MSC contractor seeking clarity, and maybe forget fairness altogether Jan 22 19:57
- What contractors should take from Honest Payroll Ltd’s failure Jan 21 07:05
- HMRC tax avoidance list ‘proves promoters’ nothing-to-lose mentality’ Jan 20 09:17
- Digital ID won’t be required for Right To Work, but more compulsion looms Jan 19 07:41

Comment