Questions tagged [Transact-SQL] (96)

2
answers

As for sql server to implement the spelling of Russian words?

The table is loaded the purpose of payment, such as "Beforeandfee for the shockandfine tiles without VAT". Need to get fixed "PredonBoard for the shockon theright tiles without VAT".
lia_Okunev asked April 1st 20 at 16:32
3
answers

How to make join on like?

There are 2 tables, one has ID column ID 576000, in the other table too ID code as the screen, the Central part is completely identical, is it possible to make the join? or not? how then to connect this criterion? according to this criterion
Helga_Fay asked March 31st 20 at 21:30
1
answer

SQL query to display all orders with a certain set of goods?

MS SQL server Table products and order numbers to which they relate Need a query to get only the yellow highlighted orders
samson58 asked March 31st 20 at 19:55
1
answer

How to write a complex query to a table?

There is a table with sales by day. She naturally has a huge number of rows. With this table I create PIVOT to group sales by month. Doing this is a complex query where the dynamically determined one month from the date of them are columns for PIVOT well and the result is displayed. The crux of the matter. There is a second...
Jevon.Halvorson asked March 31st 20 at 14:44
1
answer

What is wrong in the expression NOT IN?

What is wrong in the expression NOT IN?RequestSelect ACCOUNT_ID, PAYMENT_DATE, coalesce(DATEFORMAT(pay.PAYMENT_DATE,'mm.yyyy'),'nl'), ---DATEADD( MONTH, -1, DATEFORMAT(pay.PAYMENT_DATE,'mm.yyyy') ) DATEADD( MONTH, -1, pay.PAYMENT_DATE ), ----DATEFORMAT((DATEADD( MONTH, -1, pay.PAYMENT_DATE )), 'mm.yyyy') ) DATEFORMAT(DAT...
Damion_Ha asked March 31st 20 at 14:14
1
answer

How to fix T-SQL?

When you search for information on how to transform binary data from database in specific files on the disk, in the Internet you can find the following scriptDECLARE @SQLIMG VARCHAR(MAX), @IMG_PATH VARBINARY(MAX), @TIMESTAMP VARCHAR(MAX), @ObjectToken INT DECLARE IMGPATH CURSOR FAST_FORWARD FOR SELECT field1 FROM Tabl...
Vince_Hackett asked March 29th 20 at 23:31
2
answers

How to use other databases in the function?

Is the simplest function returns a table - SELECT the values by ID, for example CREATE FUNCTION dbo.func1 (@dbase varchar(max),@t1f1var int) RETURNS @restbl TABLE(int t1f1,t1f2 int) AS BEGIN insert into @restbl select t1f1, t1f2 from (I want to write here '+@dbase+')dbo.t1 where t1f1= @t1f1var return; END In fact, this...
Kayley asked March 29th 20 at 21:26
2
answers

Are there any books on SQL Server and/or Transact SQL newer 2014 in Russian?

All that are kind of old school, the latest in Russian from what found 2014. Does anyone know anything fresh?
Merle_Sau asked March 25th 20 at 13:45
2
answers

How to create a Tsql query on selection of the user in the workplace?

COMPUTER ( Computer_id PK int not null, --Id Com Name varchar(255) not null ) --Name Com USER ( User_id PK int not null, -- user id Login varchar(255) not null , -- login users Name varchar(255) not null ) -- name Users S_EVENT ( Event_id PK int not null, --1,2,3,4, Name varchar(255) )-- the Event Id 1 On 2 PC Off PC 3 Log...
tony_Waters86 asked March 25th 20 at 11:15
2
answers

How to pass in PIVOT (T-SQL) variable instead of listing the columns?

Trying to make a dynamic PIVOT. But it is impossible to pass the column name through a variable. There is a table of the form: Article | Title | Amount | Month 1001 Product 1 234 January 1001 Product 1 435 February 1001 Product 1 213 January 1002 Item 2 123 January 1002 Item 2 32 February Request type below works fine:S...
minerva_Denesik asked March 24th 20 at 11:34