I've a SQL query that queries an enormous (as in, hundreds of views/tables with hard-to-read names like CMM-CPP-FAP-ADD) database that I don't need nor want to understand. The result of this query needs to be stored in a staging table to feed a report.
I need to create the staging table, but with hundreds of views/tables to dig through...
I need to determine file type (i.e., MimeType) of stored data in the SQL Server 2008.
Is there anyway, if possible using SQL query, to identify the content type or MimeType of the binary data stored in the image column?
...
I have the SQL2008 version of SMO and although it uses this class internally I can't figure how to bring it into scope so I can declare variables to hold values of this type.
Yes I know I could declare them as object but then I'd still be unable to cast them to pass typed parameters.
What reference do I need to add to my project and w...
Hello everyone,
I am using VSTS 2008 + C# + ADO.Net + SQL Server 2008. When connecting from another remote machine, normally TCP/IP protocol is used by ADO.Net client to connect to SQL Server 2008. When connecting locally (ADO.Net client and SQL Server on the same machine), normally shared memory or named pipe is used.
My question is, ...
Hello, can anyone help please. I need to put an IIf within an IIf within an IIf. I have a parameter called 'Period' with 4 labels, '24 Hrs, 3 Days, 7 Days, Month'. I have another Parameter ('Date' and hidden) containing the following DateSerial
'=DateSerial( Datepart("YYYY",Now()),Datepart("m",Now()),Datepart("d",Now())-1 )'
which ...
I need to include several stored procedure in a single transaction in a single database,
if any of stored procedure fail then roll back transaction of all stored procedure procesed in the scope.
I work with SQL-SERVER 2008
...
I want to update a table called Sorels_ext from a table called Sorels. The link between them is the fkey_id of Sorels_ext equals the identity_column of the Sorels table. This is my first attempt at a Merge statement and I'm trying to learn the syntax.
MERGE Sorels_ext AS SORe
USING (select SOR.identity_column, CASE
WHEN left(SO...
I need to log the Severity of Error in OnErrorCode event handler in SSIS.
Severity can be like : Info, Warning, Critical
I am just curious if anybody knows about how to get this information to log in EventHandler in SSIS and provide any URL which can be useful in looking for this ?
...
Hi
I have the following SQL:
SELECT * FROM Name
INNER JOIN ( SELECT 2 AS item, NameInAddress.NameID as itemID, NameInAddress.AddressID
FROM NameInAddress
INNER JOIN Address ON Address.AddressID = NameInAddress.AddressID
WHERE (Address.Country != 'UK')
) AS Items ON (Items.itemID = Name .Name ID)
I have been asked to r...
Hi
How would I convert the following to use INNER JOIN rather than nested SELECT?
SELECT
[Name].[NameValueID],
[Name].[NameTypeID],
[Name].[NameID],
[Name].[Value]
FROM [Name]
WHERE Name.NameTypeID IN ( SELECT NameTypeID FROM @tbNameType )
OR Name.NameID IN ( SELECT NameID FROM @tbName)
...
We were extracting data out of Netezza into txt files, loading into SQL Server and processing our SSAS cube(s) from there.
We want to change that and load the cube directly from Netezza.
What are the things to keep in mind for this?
...
I have a database which has an orders table and inventory table.
The order-items table has a 1 record per 1 qty layout, so if a person places an order for 7 'ABC's, and 4 'XYZ's, I get 11 records in the table.
id, item, qtyNum
01 ABC 1
02 ABC 2
03 ABC 3
04 ABC 4
05 ABC 5
06 ABC 6
07 ABC 7
08 XYZ 1
09 XYZ 2
10 XYZ 3
11 XYZ 4
The...
Which is faster for millions of records: Permanent Table or Temp Tables?
I have to use it only for 15 million records. after Processing complete. we delete these records..
...
Does it make any sense to store just a year in the new Date SQL type in SQL 2008? My boss wanted this but we're prompting the customer to enter year optional in a web form..just 4 integers. I don't see why we'd use Date datatype as that also includes day and month and I've already got those seperated out into int fields in our DB table...
I am creating partition function and schemes.
In SQL Server 2008, it only defines range partitioning and not list partitions.
Dont we have list partitioning in SQL Server?
I am using SQL Server 2008 Enterprise edition.
...
I need to use the SQRT function as part of a where clause in a Linq EF query. I figured I could do this:
var qry = context.MyTable.Where("sqrt(it.field) > 1");
But it returns an error saying "'sqrt' cannot be resolved into a valid type constructor or function., near function, method or type constructor, line 6, column 5."
I had alwa...
I have the following error while I connect to SQL Server 2008 Management Studio with Windows authentication.
"The request failed or the service did not respond in a timely fashion.
Consult the event log or other applicable error logs for details."
Is anybody tell me why i am getting this error, whereas my SQL Server is running under n...
Hello everyone,
I am using VSTS 2008 + C# + .Net 3.5 + ADO.Net + ASP.Net + SQL Server 2008 Enterprise + IIS 7.0. I want to save my time to write an simple ASP.Net web site. And want to see if I can find an available one here. :-)
What I need is very simple, (1) basic UI (2) could edit/update/delete data from database (any kinds of data...
I want to limit my database possible access ways to only using stored procedures. Everything works fine except System.Data.SqlClient.SqlBulkCopy. I'm using it only in one class for massive data import.
Is it possible to avoid this problem?
I tried to grant a right before calling SqlBulkCopy and remove it after:
EXEC [db_mod].[sys].[sp...
I'm just getting started with Visual Studio Database projects and loving the data generation plans I can create with it. However, in one of my projects I need to populate a lookup table with specific values. Since a foreign-key relationship exists between the lookup table and another table, I can't remove the lookup table from the data g...