Error: PLS-07204: conversion away from column type may result in sub-optimal query plan
@MarkStorey-Smith although there are many more but simply asking here doesn't make sense(i.e. it would like asking all the errors here instead of trying it myself)
but the rudeness could have been from this deleted comment @AaronBertrand
> Oh my gosh, then do it with two operations. What is this question really about? Bypassing permissions? What does "only allowed" mean? Is mommy validating your queries?
@ypercube Rolando had an answer with an upvote and a downvote, which he deleted (I didn't check timeline, but I presume immediately after the downvote).
You don't quite have SQL Server's proprietary UPDATE FROM syntax down. Also not sure why you needed to join on the CommonField and also filter on it afterward. Try this:
UPDATE t1
SET t1.CalculatedColumn = t2.[Calculated Column]
FROM dbo.Table1 AS t1
INNER JOIN dbo.Table2 AS t2
ON t1.Co...
And I think I'll like Tim Horton's even less now that it's going to have Burger King influence. I don't know if there's worse fast food anywhere than Burger King.
@AaronBertrand nice. i stopped eating there in high school when a friend of mine who worked there said that the meat came out of bags labeled only as "fit for human consumption"
@JNK not if i can help it. you may want to head over to SSC and see if you can get Steve Jones' attention
My friend did all this awesome TDD stuff when he first got here and he was the only one doing it, couldn't get management buy in to force others so he gave up
I have a table in SQL Server that is performing very slowly and I have been trying different indexing options to try to speed it up to no avail.
I suspect all of the varchar(max) fields may be a source of the pain...
Here is the structure:
CREATE TABLE [SurveyData](
[sdid] [bigint] IDENTIT...
hey folks quick question: I'm a developer charged with researching moving all of our on prem dev/qa/prod environments to azure. we're a msft shop maintaining a .net web app with a sql backend.
I'm not a dba by trade but I have enough knowledge to get by. what i'd like to know is if there is a tool or script I can use to analyze our on premise production dbs so I can determine what the correct sql azure tier is. i'm not sure if this is on topic--if it is i can post as a question, if not, any tips on where to start learning are much appreciated -- peace
and by performance, i mean how our processor usage, reads, writes, etc. would translate into DTUs etc.
I have two tables in a SQL Server database, that are in a many-to-many relationship, with the rows in TableA representing the 'container' structure in my business logic, and TableB the 'child' objects that can be included in any number of those containers. I've created a linking table, TableA_X_T...
Why are you bothering to store the sequence number if it has absolutely no bearing on the actual value in that row? Just determine the number at runtime (e.g. using ROW_NUMBER()) instead of trying to maintain this meaningless data in the database. It's really not meaningful at all until someone actually queries the data that actually exists at the time they run the query, right? So why break your back trying to keep the stored data in some magical, gapless nirvana? — Aaron Bertrand6 secs ago
OMG next bad habits post - caring about gaps
And after that gauging the performance of SQL queries by rendering 18 bazillion rows in a Management Studio grid over a flaky VPN connection
(I might have to come up with a more concise title for that one)
But why update the table? You're going to have to perform this maintenance every time any row is touched. Put the ROW_NUMBER() expression in a view, then you can get the real-time sequence at runtime without having to do all this extra maintenance for every single write. — Aaron Bertrand13 secs ago
I am in need of some help figuring out the best way to join separate tables I am using.
I am essentially trying to output a list of schools (first table in MYSQL) where one column is an empty star icon, and the star will only be filled if the school exists in a users saved school profile (second...
well, they still need to be speed that are comparable (meaning the magnitude of a vector that has the same direction and sense) if you want to use them directly
So i have a bunch of .dtsx job files that execture a set of tasks and at the end they generate a report using .rdl report files. I currently have the .dtsx files seperate than the report .rdl files and i cant seem to create a project that holds the SSIS packages with the .rdl files. I cant combin...
@JNK NFL is this game where people dressed in plastic armour fall into one another until we can't see the one that holds the egg? And then take like 10 minutes to organize again in 2 lines?
Can someone please help me understand what exactly this query does?
SELECT pp.Sedol
,MAX(MAX(Id)) OVER (
PARTITION BY pp.Sedol
,MAX(pp.ValueDate)
) PriceId
FROM Prices pp
GROUP BY pp.Sedol
@MarkStorey-Smith SQL Azure -- our dev team is moving into more of a devops role where we will be more hands on in production so not having to deal with VMs and only focusing on the app code/db is our goal. i'm trying to get a bead on what our current on prem db is doing so I can translate that into the correct service tier
@MarkStorey-Smith I suspected it was off-topic so I figured i'd give chat a shot--thanks for validating my suspiscion
@MarkStorey-Smith db backend for a public website -- currently two backend db vms, prod database is only 40gb, less than 10,000 users a day. I'm curious about how our current usage would calculate into DTUs I could see us using an S1 or S2 but I'd like to have some data to back that assumption up
@MarkStorey-Smith that's great i'll check it out--that was my initial plan: figure out what the current demands are and then try to recreate that against an instance in azure and see how it does
@MarkStorey-Smith i'll go along this route and run with it and see how far it gets me--thanks for the feedback
@AaronBertrand i'm just still in shock that it's an actual "thing." now if they'd update their guidance to avoid the "only install SPs" then that'd be nice
It's simple. Every 27 years is a full epoch so we count that as 1. The decimal numbers use this cool bitmask function to encode the rest of the data and of course, we use 1898 as our epoch date
Since there will be no more service packs, it seems like they could draw a line in the sand with real calendar dates instead of mocking you with word problems.
I was reading this documentation from Microsoft about SEMANTICSIMILARITYTABLE
And there's a detail in the example
It says
SELECT TOP(10) KEY_TBL.matched_document_key AS Candidate_ID
FROMSEMANTICSIMILARITYTABLE
(
HumanResources.JobCandidate,
Resume,
@CandidateID
) AS KEY_TBL
ORDER BY KEY_TBL.score DESC;
instead of
SELECT TOP(10) KEY_TBL.matched_document_key AS Candidate_ID
FROM SEMANTICSIMILARITYTABLE
(
HumanResources.JobCandidate,
Resume,
@CandidateID
) AS KEY_TBL
ORDER BY KEY_TBL.score DESC;
Yes it was ".trn" thank you. It deleted all older than 2 weeks backup files, but I see the ".bak" file extension now for the file name, although the maintenance plan for it still shows the backup type to be "Transaction Log" and the file extension is "trn", should I worry about this? as it may not delete the .bak after 2 weeks since the file extension should be trn... Thanks again for your help — Mary4 mins ago
I have a query excel in each of my rows, about 2000. When I copy paste all queries into sql server roughly 100 rows are showing a error in sql. Might not even be an error but the query will paste into sql with double quotes in front of entire query. I have error checking in place so it has somet...