Type: Posts; User:
OK, suppose your |~| operator means "Take the greater of values on either side and square it, then add the lesser value."
So we create a function:
Create Function dbo.PipeTildePipe(
In MS SQL Server, you can create user defined functions, which amounts to the same thing.
Have a look at Computed columns.
Create Table t1 (
[ID] int identity (1, 1) NOT NULL,
[Month] char(3) NOT NULL,
[YEAR] smallint NOT NULL,
[ProdA] int NOT NULL,
[ProdB] int NOT NULL,
Ok, I haven't been around for a year or so...
A few things:
1. For EVERY field that you submit to the database, escape single quotes by doubling them up. This prevents 99% of the hacks and keeps...
can't do it that way. if you have permissions on the linked server, just go ahead and create the index directly
You need to explicitly perform the replace for each field. You could put all the form values into an array and loop it, but then you wouldn't know which is which to put into your SQL statement. Of...
Should use SSIS package to do this...1st step, import the file to your domain. Then do a bulk insert.
sure you will. if you use proper coding practices -- validate all input for data type and length...and in many cases, origin.
A million unique items? Wow. A well thought out schema and appropriate indexing is going to be key. That said, the amount of data isn't the issue, it's the amount of transactions. How many write...
I need to respectfully disagree with Felgall. cascading FKs are one of the worst things you can do to a database.
It makes for inconsistent code and difficult to trace bugs. No foreign key should...
you've mixed up your server side and client side scripting looks like
Clustering is a High Availability solution, not a Scalability solution.
Replication works fine for very large applications, including those distributed over geographically distinct areas.
there's no syntax error. what DBMS and version are you using? if that's not MSSQL 2005 or 2008, then yeah, it's a syntax error.
also, by the way, why are u using uniqueidentifier instead of an int...
That is nowhere near what I'd call large. MySQL will handle it fine
Ok, there is a lot of misinformation in this thread. First, we really would need to know what DBMS you are using. That said, here are some general guidelines.
Index fields that are used in your...
someone (you?) has the access database open. close it.
wow, that syntax isn't even close. (sorry, not trying to be a wise guy). if you are using query analyzer, hit the TEMPLATES tab and look at CURSOR. there is a cursor template that you can copy/paste...
it's attempting to convert a binary string to a character string, then execute it.
don't execute it unless u know what it does.
that said, it errors out on the cast() so i didnt decode it. try...
how did u backup the database? with a backup command? or do u just have the .mdf and .ldf files? Also, what is the method u are taking to restore it? and where is the file(s) located? what do u mean...
what you are trying to do is certainly valid. let's see the entire query
ok, what i mean is that the physical limits i've already listed above. the theoretical limits to obtain good performance depend on the purpose of the database and how users/applications will interact...
why all those quotes?
tried like this?
command = "D:\Intra\Encrypt File.bat " & strSource1 & " " & strDestination1
tried just a simple echo to make sure...
ok, if you must use dynamic sql in your SP
declare @filter as varchar(100)
set @filter = '''15'', ''16'', ''17'''
EXEC ('select name, height, weight from tblPerson where age IN (' +...
the syntax in the original post clearly indicates SQL Server -- as does the text of the question itself :) and it quite elegantly solves the main issue