I don't think it will allow you to change Computer column expression on the Fly... Instead add new column with new expression and name it as newColumn. Delete you old column and then rename newColumn to Original column name using below command.
If you had the opportunity to re-design a large system's DB layer, that beside pure data contains a fairly large amount (hundred of thousands every year) of files, would you use BLOBs or external storage?
The facts are known about those files:
1. Most of them are PDF, DOC(X) and image (JPEG, TIFF, BMP)
2. No search inside the files are required
3. Files are acceded mostly (95% of the time) directly
4. History of files are important
Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.
Blobs put heavy weight on the tables, the bigger they are the slower the operations. Also if anything corrupts on one file you'd have to restore a DB table instead of a single file or directory.
Also it would be more scalable as it would allow you to use different backend servers to store the files and have a rough load balancing/availability service without heavily involving the DB server, all at the advantage of performance.
You can set up a series of meta tables with locations/mappings of drives and folders and store the files outside of the database.
You could also create a series of stored procedures to check that the files are in the locations held in the database, every day or so, reporting back on discrepancies - just to catch the rare occasion where a file has been moved or deleted.
“That which can be asserted without evidence, can be dismissed without evidence.”
In other words, you can store files and documents in special tables in SQL Server called FileTables, but access them from Windows applications as if they were stored in the file system, without making any changes to your client applications.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
You are correct but when I run this statement I get no values.
So I went on to try some more ways to make it work and this statement works:
, CASEWHEN [START_DATE] IS NULL OR [START_DATE] = '' THEN
CAST(Replace(convert(date, END_DATE, 101), '-', '') as numeric(8,0)) ELSE
CAST(Replace(convert(date, [START_DATE], 101), '-', '') as numeric(8,0)) END AS [START_DATE]
But I can't integrate it in my DateDiff statement, can you help me please?
I have a little bit of SQL code and I am having trouble bringing it over to MSSQL. I don't even know where to being I know that the SELECT, FROM , GROUP BY and HAVING will be in the MSSSQL query.
However I know for a fact the 4th line will change into @param1 and @param2. If anyone would like to add some input into this would be nice.
Select COUNT(') AS Result, Username AS UsernameInput, [Password]
GROUP BY Username, [Password]
Having (COUNT(') = 1) AND (Username = ?) AND ([Password] = ?)