sql

Need list of all SharePoint Farm users with associated objects and permissions

Greetings, I'm looking for a little SQL to QUERY (with NOLOCK, of course) from the raw SharePoint SQL Content DBs to produce a list of users, objects and their assigned permissions. I have done other "raw" queries without problems.... for a list of all users enrolled within a site ... but I'm stuck on how to determine WHAT OBJECTS (Web...

Starting my first business application?

I am starting work on my first business (application + database) type application, using c# and sql I'm completely new to this, What tips do you have for me? What should I look for? What concepts should I understand? ...

SQL-Like Selects in Imperative Languages

I'm doing some coding at work in C++, and a lot of the things that I work on involve analyzing sets of data. Very often I need to select some elements from a STL container, and very frequently I wrote code like this: using std::vector; vector< int > numbers; for ( int i = -10; i <= 10; ++i ) { numbers.push_back( i ); } vector< int ...

SQL Server Database Development Standards

I have to develop database development standards for our organisation for SQL Server and any code that interfaces to it. The code used can be anything from .NET code to VBScript to SQL Server Jobs. Does anyone have a good link for this kind of thing? My quick list is follows: 1) Naming Conventions -- Stored Procedures usp_AppName_SP...

Very Basic LINQ to SQL Question

My question is regarding a code sample from this MSDN article: Getting Started (LINQ to SQL) The following code is listed in the article: // Northwnd inherits from System.Data.Linq.DataContext. Northwnd nw = new Northwnd(@"northwnd.mdf"); var companyNameQuery = from cust in nw.Customers where cust.City == "London" select...

SQL: update all values of X to Y based on a translation table

I have a Microsoft SQL server DB that imports some data which needs a bit of cleanup; some fields need to be remapped based on a second table. For example: Table: Data User Country Alice Australia Bob Sydney Carol London Dave London Table: Translations From To Sydney Australia London United Kingdom Unfortunately c...

SQL query hangs on join

Hey folks, I've written an SQL query that produces a report of some stats for each Year-Week-Mine-Product. It works exactly as desired except for one thing - trn.wid-date isn't the correct date to be using. I should be using td.datetime-act-comp-dump. When I replace trn.wid-date with td.datetime-act-comp-dump, it doesn't give me any...

TSQL Features in SQL 2008 Vs SQL 2005

What are the advanced Features With SQL2008 over SQL2005 Particularly with TSQL ...

Linq to Sql convert to generic list in VB.NET

Hello everybody. I am trying to learn some VB.NET for my coo-op that starts next week, and for that reason i took my portfolio web site that is on C# and just started to converting it to VB.NET to get familiar with the syntax. I am sure my problem is simple however i have a hard time solving it. I am trying to grab data with the linq qu...

How do you do an extended insert using JDBC without building strings?

I've got an application that parses log files and inserts a huge amount of data into database. It's written in Java and talks to a MySQL database over JDBC. I've experimented with different ways to insert the data to find the fastest for my particular use case. The one that currently seems to be the best performer is to issue an extende...

How can i see the SQL Server queries coming from my program?

I have this c# web app that relies heavily on two dll files that i can't see nor edit. The rest of the app is visible and editable. The app generates SQL exceptions, and i would like to see the queries sent from the DLLs. Is there a way to do that? ...

Using Columns Containing non-Identifier Characters in SQL

hi, can i write a select statement i n SQL Server like: select * from emp where Emp Name='joy' or select * from emp where EmpId/Sno=7 whether spaces,special charaters like a comma are allowed in that specified select statement when the column name is having them. Thanks in advance.. ...

I am using SQL Server 2008, is it ok to define an Index on a DateTime column?

I heard somewhere that declaring an Index on a date column is bad for performance, but I can't find any reference on the internet. Suggestions? ...

Finding events in a transaction file where more than 5 serial numbers appear in sequence within 100 transactions.

I've had an unusual client request in regard to fraud detection in an online raffle which I'm trying to build as efficently as possible by pushing as much of the task into SQL as possible. The structure is thus: table: codes raffle_code | ticket_type | sequence A00000001 Red 1 A00000002 Red 2 ... A0000...

pl/sql save as

hi im from madrid and i wanted to know how to save a query/cursor, in a XXXXXXX.sql. thanks!!! ...

Show the sql Django is running?

is there a way to show the sql that django is running while performing a query? ANSWER: import connection from django.db from django.db import connection print connection.queries [{'sql': 'SELECT polls_polls.id,polls_polls.question,polls_polls.pub_date FROM polls_polls'; 'time': '0.002'}] ...

SQL command get reflected in log

i'm using master.dbo.xp_cmdshell "bcp ##CDBOut out c:\tmp_WPCreateDB.sql /c /S' + cderty + ' /U UNAME /P PWD" but the command gets refelected in my log file ,why it is echoing in log file? ...

Informix 7.3 isql insert statement - text/blob/clob field insert error

Is a way around this?? I am trying to insert some data into a table whose structure is: Column name Type Nulls crs_no char(12) no cat char(4) no pr_cat char(1) ...

How to preserve old data that might have to be reinserted into the database?

We have a partitioned view with 12 member tables. The partitioning column is a date, we have one table for each month. Data are continually being inserted into the table of the current month. Older tables are constant. At the beginning of each next month a new table is going to be created and added to the view. At the same time we are g...

SOAP call with query on result (SSRS, Sharepoint)

Hi! I created a report in VS using a shared data source which is connected to a sharepoint list. In the report I created a dataset with a SOAP call to the data source so I get the result from the sharepoint list in a table. this is the soap call <Query> <SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems&lt;/SoapActi...