Information about metadata
Dear friends, where can I find information about metadata in SQL Server 2008/2012? Except of Diagrams. Thanks a lot for answers, Anna
View Articleif and insert statements
HI,Basically I'm creating a student test-software and a part of my table structure is as follows:RESULTS_TBL: QPaper_ID, Marks, Class, Subject, Grade, Student_ID [THIS TABLE STORES THE CALCULATED...
View Articlequery help
I have written the following code:SELECT a.nameFROM Artist a, Author au, Arts oWHERE a.aid=au.author AND au.art=o.oid AND COUNT (o.type)=2GROUP BY a.name ; But when i try to run it it shows that i have...
View ArticleFinding discrepancies in two tables is SQL Server for two fields that have...
Hi,I have two tables namely table1, and table2 that both have amount and id. The id is the same in both fields and the sum(amt)in both tables must be the same for the same id else there is...
View Articlewhat do I have to do to make this code work in sql server 2012?
CREATE TABLE hires AS SELECT * FROM Employees;sukai
View ArticleHow do I duplicate rows?
I have difficulties solving a problem. I'll try to explain the problem the best I can. I got two tables: Table A and Table B. Due to some poor programming the tables are not normalized and this is...
View ArticleHow to select latest row when ID has one or more rows and each ID row has...
I have a equipment table and the equipment has a coding for each place / location or custody it has had during its life. I need to select the latest (newest) row for each piece of equipment by getting...
View ArticleTable Trigger not working properly
Hi,I have a DimProduct and StagingProduct tables.I have a trigger that checks if the record (in staging) to be inserted/updated to DW overlaps with the record in DW.The trigger works perfectly if i run...
View ArticleGetting the SQL from a EXEC sp_prepare statement captured in profiler
I am watching server activity and see the occasional EXEC sp_execute ?;. I would like to connect the number on the execute to a text representation of the SQL.If you execute the following in SSMS, you...
View ArticleProblem using temporary table in Sql server 2005
I have this stock procedure alter procedure Eqp_Traitement as begin SET nocount on; declare @num_row as int declare @sqlstmt as varchar(max) declare @listetable as varchar(max) declare @eqp as int...
View ArticleParent - Child data in one table
Hi All,I have table which has columns Id, Name, ParentId. I need data from this table, first one parent followed by its children and then next parent followed by its children.CREATE TABLE #t1 (id...
View ArticleAutoincrement ID
I want to update id column to be reset and incremented by 1 whenever the new siteid will come; Raw Table; IDSITEID PARSINGTYPECONTROLLINGSENSORIDALIASID2 095301 Delivery Left1 095303 Delivery Right2...
View ArticlePlease help me
Hai everyone, can you help me, how to get COUNT absence if employee was sick,absent,permit in 1 monthi have code like this SELECT DISTINCT No_Employee,(SELECT COUNT(Status)FROM DeltaDjaya.dbo.Absensi...
View Articleuser not able to connect to sqlserver
when user tries to login using mstsc to dev-sql03 the user authentication is not workingWhat should be doen to troubleshoot?Best regards,Vishal
View ArticleSuggestion for alternative to pivot?
I have a table on a linked server which I access via a synonym.The table has 75 columns, and only one row used to set up the application visible fields etc.The table columns are something...
View Articlegetting value for a variable from a looping sql query
I have a table called projects. This table has about 5 rows in it. In that table there is a fields called projectschema. I have a query that I want to run using the projectschema as a schema variable...
View ArticleQuick Data Retrieval
Good afternoon,I'm hoping someone here in this forum can assist with my issue.I have an Event table with 13.3mm rows. The primary key is EventID (int), and contains StudentID (int) and Comments (TEXT...
View ArticleInserting resultset of a query into a table
I need to insert data from a sql script into a table. The query has multi select statements and declare and can have any sql statement. Simply I need to take the sql script from a user and insert into...
View ArticleHappy Birthday to Grace Hopper
Today is the birthday of Grace Hopper, Rear Admiral of the US Navy and programmer of the A-0 compiler and started the wonderful journey of development into languages such as COBOL and FORTRAN, much of...
View ArticleBulk insert 0 rows effected
Hi I am trying to bulk insert pipe delimited text file below is my text file looks likea|b|c|when I look at the file it has lot of spaces after the data so when I try to bulk insert it is searching for...
View Article