I am programming an Access 2007 (accdb, not adp) frontend at connect to a SQL Server 2005 backend. How can I call a scalar user defined function from my vba code?
Hi,
I have a Database (Sql-server) with table named 'ProcessData' and columns named 'Process_Name' (Data Type: nvarchar(50)), 'Start_At' (DataType: DateTime) and 'End_At' (Data Type: DateTime).
I need to konw for each 'Time-Interval' (let's say 1 second) how many processes (Process_Name = PN) was open (after or equal to the 'Start_at' column and before or equal to the 'End_At' column) during this time (It can be a few rows with the same data).
Does anyone know how to make this query?
Many thanks,
Table A has columns ID and AName, Table B has columns BName and ID.
B.ID is foreign key of A.ID.
Write a SQL statement to show data like:
print column AName and C which describe whether Table B has ID in Table A, if exists 1 or else 0.
So if A is:
1 aaa
2 bbb
B is:
something,2
output is:
aaa,0
bbb,1
Hi,
I hope somebody can help me out on this question.
I'm using a SQL database and I'm writing a VB.NET client application. This application is used on multiple computers at the same time. If one of the clients makes an update to the database I would like to have the other clients to be aware of the update.
Has ony one already done this before?
Thank you very much!
Marcel
I have two tables that I'm trying to create a relationship between so I can write nice LINQ queries that don't require join.
Widgets
WidgetId
WidgetDescription
Orders
OrderId
WidgetId
OrderDate
What I want to be able to do is create a LINQ query that does something similar to:
var result = from x in db.Widgets
Where x.Orders.OrderDate == "5/11/2010"
select x;
I can't seem to get intellitext to pick up the other database despite creating a relationship in SQL server. Are there any additional steps I need to take to make this work?
Is there a way in sql (or tsql) to select the median of a column of numbers? I know you can sort by the column and pick the middle value, but it would be nice if there was a built-in function
I've got a database with collation Danish_Norwegian_CS_AS and lots of varchar columns. I'd like to convert all this data to unicode, but haven't found a way to convert this data yet. If I've understood correctly, the encoding used is UCS-2 little endian.
For example I've got a column containing 'PÃ¥l-Trygve' which is easily converted with C# to 'Pål-Trygve' using Encoding.Default.GetString(Encoding.UTF8.GetBytes("PÃ¥l-Trygve"));
Is there a way to do this conversion in the Microsoft SQL Server client?
I have a scripted database SQL file that I need to execute inside Visual Studio to create a new database. I am so far unable to locate any function that allows me to do this.
I would like to get some opinion on production SQL environement enabling CLR
1) What are the disadvantagies of doing something like this.
2) I also would like to know the adoption of something like this.
3) Anything best practices we need to keep in mind when we implement CLR based SP and Triggers.
I have a table that describes which software versions were installed on a machine at various times:
machine_id::integer, version::text, datefrom::timestamp, dateto::timestamp
I'd like to do a constraint to ensure that no date ranges overlap, i.e. it is not possible to have multiple software versions installed on a machine at the same time.
How can this be achieved in SQL? I am using PostgreSQL v8.4.
I would like to turn this query to regular inline sql without using stored procedures
declare @nod hierarchyid
select @nod = DepartmentHierarchyNode
from Organisation
where DepartmentHierarchyNode = 0x6BDA
select *
from Organisation
where @nod.IsDescendantOf(DepartmentHierarchyNode) = 1
Is there a way to do it?
Hi Team,
I am using SQL Server 2005. I have a requirement to list out all the tables (and the column) whcih has the value 'xyzeee'.
Is there a query to achieve this?
Thanks
Lijo
What is a positions of SQLCE 3.5 when running on Windows Mobile 6.0 in relation to FIPS compliance.
I have read lots of differing reports on this and need a definitive answer, one which comes from a reliable source (please provide links)
I have read this
"The encryption modes in SQL Server Compact 3.5 are FIPS complaint if FIPS mode is enabled at the OS level."
Is this true? if so how does one enable it at the OS level.
I want to transfer data from SQL Server table to Excel sheet using 3 tier architecture in asp.net 3.5. After user has made required changes in the Excel sheet I want Excel sheet to get uploaded and update data in the table with validation for proper data.
Hi,
I'm querying an SQL Server database using SQLAlchemy and need to cast a column to varbinary(max). The thing I am struggling with is the "max" part. I can get the cast to work for any actual number (say varbinary(20)), but I cannot find how to get it to work for the "max" size of the varbinary column.
Any pointers? Links? Solutions?
Regards,
Mark
If there are no begin and end statements in sql, the next statement is the only one that gets executed if the if condition is true...in the case below, is there anyway the insert statement will also get executed if the if condition is true?
IF (a > 1)
SET @b = 1 + 2
INSERT INTO #F (a, b, c) VALUES (1, 2, 3)
Hey, I made several tables and relationships using SQL server manager. I then imported them to visual studio and it all appeared in the correct form, except one of the relationships did not appear. I have checked everything I could think of and it is the exact same as the other relationships. If you know anything I can check, I would appreciate it. Thanks
I am using the entity framework, visual studio 2010.
Hello Experts,
I have data like this
d b c
a d
c b
a b
c a
c a d
c
if you analyse, you will find the appearance of each element as follows
a: 4
b: 3
c: 5
d: 2
According to appearance my sorted elements would be
c,a,b,d
and final output should be
c b d
a d
c b
a b
c a
c a d
c
Any clue, how we can achieve this using sql query ?
how do you make your software aware of database records changes that was not modifed by your application? (ie it was modified externally, in MS SQL Server Management Studio or other).
Do you do a checksum? and store it somewhere? or what do you do?
Hi,
I have a tabel in an Sql Server 2005 database. I have the following column
IndPL INT DEFAULT 0 NULL
I want to change the column to be of the type NVARCHAR but I receive a constraint violation due to the fact that the column has a default value constraint attached to it.
I need to find out how to remove a default value constraint from a table column or how to change the column type without impeding the constraint.
I have scheduled backups running through SQL Agent, with Full Backups nightly, and differential backups hourly. Is there a way to determine which of the backup files is the Full backup, and which is the latest differential?
Intuitively, it would seem the largest backup within 24 hours is the full, and the latest smaller backup is the partial. However, this isn't robust.
Is there a way to probe the backup file to check the backup type? (Preferably in c#)
Hi all,
Well I have read ALOT of posts and I can't quite find the perfect answer to my question, (or I have and havn't realised it!:-))
I have a large csv file that I want to read into my program and sve it to a SQL database table.
I'm useing VB2008 and my dabase is SQL2008.
Any help would be appreciated.
Cheers Cookster