Viewing 15 posts - 76 through 90 (of 4,080 total)
Withdrawn. I didn't look at the expected result set carefully.
November 26, 2019 at 5:17 pm
The query below will produce the combined results of your four queries. However, I think it would be more meaningful if you also included the TYPE and the ORIGINE...
November 25, 2019 at 8:29 pm
Might be worthwhile to first query the commodities table and put the results into a #temp table indexed on commodityID, then join to the #temp table. Depends on how many...
November 15, 2019 at 8:26 pm
Sorry for being gone so long, regretfully I was in the hospital. Apologies. Sadly, I worked with all this years ago and have given away all my books. ...
November 15, 2019 at 7:58 pm
Can you direct the output from the SQLCMD script to a text file, then open it using OpenRowset??
November 15, 2019 at 7:53 pm
Are there no SYBASE forums? 😉
November 15, 2019 at 7:48 pm
You didn't specify a length of the strings you wanted. This illustrates finding repeats from 1 to 4 strings long. The LEAD() function allows the query to look 1...
November 15, 2019 at 5:44 pm
Assuming you are talking about SELECT statements, it really depends on the amount of data being retrieved. But usually anything running for three minutes is NOT running efficiently. ...
November 15, 2019 at 4:57 pm
You're welcome. And I admire Drew's solution. Just couldn't dredge one as elegant up.
November 15, 2019 at 4:46 pm
bmg0002:
Just to clarify, I am not advocating a unique int (or bigint) column simply as a row identifier. It would become the primary key which all foreign keys would refer...
November 15, 2019 at 4:42 pm
What you are showing in your example isn't a true rank. Essentially it is just grouping similar status codes, incrementing an integer each time the status code changes. You...
November 14, 2019 at 9:41 pm
Even if an table is fairly wide, applications can always run against covering indexes and indexed views. The key question is whether the data from the first file has to...
November 14, 2019 at 8:05 pm
An existence test and a TOP 1 both stop as soon as they find a row that satisfies the WHERE conditions. Run the following code. Although execution plans...
November 14, 2019 at 6:34 pm
A function cannot do an UPDATE. But for just retrieving data, I agree with the cross apply approach.
What Jeff and others are trying to explain is that if your...
November 14, 2019 at 6:04 pm
Row locks run slower than page locks, which are the default locks used by SQL Server. (https://littlekendra.com/2016/02/04/why-rowlock-hints-can-make-queries-slower-and-blocking-worse-in-sql-server/) I'm not sure what you think Rowlock will buy you.
Merges...
November 14, 2019 at 5:22 pm
Viewing 15 posts - 76 through 90 (of 4,080 total)