Hello,
I am new to SQL Server development. Most of my experience has been done with Oracle.
suppose I have the following table that contains Appointments objects
CREATE TABLE [dbo].[Appointments](
[AppointmentID] [int] IDENTITY(1,1) NOT NULL,
.......
[AppointmentDate] [datetime] NOT NULL,
[PersonID] [int] NOT NULL,
...
Does Sql Server management studio have no nice support for multi-monitor setups?
The only way I can see to use it multi-monitor is to stretch the main window across both monitors, but this isn't really practical, as my two main monitors are different sizes and resolutions (external monitor on a laptop).
I was hoping for something at ...
I have a view assembling data from various tables:
Create View Test_View
As
Select
t1.Id as 'Id'
,t2.Flag as 'IsChecked'
etc. In the previous versions of this table, that Flag value had the values 'Yes' and 'No', and now it has been changed to bools, like it should be.
However, the application that uses this view ...
This question is largely driven by curiosity, as I do have a working query (it just takes a little longer than I would like).
I have a table with 4 million rows. The only index on this table is an auto-increment BigInt ID. The query is looking for distinct values in one of the columns, but only going back 1 day. Unfortunately, the Re...
I try to return a set of result from an xml document using xquery but I didn't figure out.
Here are my queries:
DECLARE @Data xml
SET @Data='<main>
<person>
<name>Daniel</name>
<cars>
<model>y75</model>
<model>b25</model>
</cars>
</person>
<person>
<name>Marc</name>
<cars>
<model>h20</model>
</cars>
</person>
<...
Currently struggling with finding a way to validate 2 tables (efficiently lots of rows for Table A)
I have two tables
Table A
ID
A
B
C
Table matched
ID Number
A 1
A 2
A 9
B 1
B 9
C 2
I am trying to write a SQL Server query that basically checks to make sure for every value in Table A there exists a row for a v...
All,
I'm attempting to execute a sqlserver agent job (sql-server 2008) which will execute a SSIS package via a proxy account.
I've completed the following steps:
Created a login for the AD account
which will act as a proxy
Created a credential mapped to the
above mentioned login
Created a proxy (with access to the
Execute SSIS Subsys...
I have a requirement to loop through records in a database table and group items that have similar content. I want to match on a single column in the database and if there are similar records I want to extract the ID of each row and save it to another table e.g. if I had 10 similar rows they would be linked to one "header" record in anot...
The Problem
I am using dynamic matrix groups as in Dynamic Grouping from Chris Hays's Reporting Services Sleazy Hacks Weblog (which has some great stuff and is worth checking out, by the way). I have my row and column groups bound to two multi-value parameters and everything is working great, except for one thing. Even though I am suppr...
I am having 2 instances of SQL Server 2008R2 and instance of SQL Server Express 2008.
SQLCMD, etc., works [1].
But "SQLCMD -L" and "OSQL -L" fail [2].
Why?
What am I missing in SQLCMD use?
How to use SQLCMD to get servers?
[1]
Test results of SQLCMD
>sqlcmd
1> use AdventureWorks2008R2;
2> SELECT TOP(2) BusinessEntityID, FirstNa...
For some weird reason i can not run my report, when i try to preview i get this error:
(PLEASE RIGHT CLICK THE IMAGE AND CHOOSE VIEW IMAGE TO SEE IT LARGE)
Here is how my tablix property looks like:
Any idea what to do? The current .rdl was copied from another one. I changed the newly copied .rdl values to match my needs. I always...
Hi
am new in asp.net , i want create tables in sql server 2008, actually i dont know how to create composite primary key.CAN ANYBODY HELP ME .Advance in thanks
...
Hello.
Before I give myself some sort of stress related heart attack.
Would anyone know how to complete the seemingly simply task of setting the result set of one data flow task (the result will be either a 0 or 1) and assigning that value to a variable.
I've created the variable ok.
The result set comes from an XML file with mult...
I've pasted a very simplified version of my SQL query below. The problem that I'm running into is that the ORDER BY statement is affecting the select results of my CTE. I haven't been able to understand why this is, my original thinking was that within the CTE, I execute some SELECT statement, then the ORDER BY should work on THOSE resul...
I am creating some reports for an application to be used by various states. The database has the potential to be very large. I would like to know which way is the best way to get column totals.
Currently I have SQL similar to the following:
SELECT count(case when prg.prefix_id = 1 then iss.id end) +
count(case when prg.prefix_...
Hi. I have a problem in T-SQL that I find difficult to solve.
I have a table with groups of records, grouped by key1 and key2. I order each group chronologically by date. For each record, I want to see if there existed a record before (within the group and with lower date) for which the field "datafield" forms an allowed combination wit...
I have customer registration table in SQL Server 2000, in this table have password column which is encrypted ... now I want to migrate that table to SQL Server 2008
Plz help me ....
...
I started working on this "already started" project, and I'm having a really annoying error when trying to execute some interactions with SQL Server 2008:
The server failed to resume the
transaction. Desc.:
One of these errors I get in this specific method call:
The aspx.cs Call:
busProcesso openProcess = new busProcesso(pProc...
I have a linq query running in a WCF Web Service that looks for a match and if one is not found then it creates one.
my code looks like
//ReadCommitted transaction
using (var ts = CreateTransactionScope(TransactionScopeOption.RequiresNew))
{
Contract contract = db.Contracts.SingleOrDefault(x => x.txtBlah == str);
if (c...
I need a T-SQL ranking approach similar to the one provided by NTILE(), except that the members of each tile would be on a sliding distribution so that higher ranking tiles have fewer members.
For example
CREATE TABLE #Rank_Table(
id int identity(1,1) not null,
hits bigint not null default 0,
PERCENTILE smallint null
)
--Slant the dist...